Example usage for org.eclipse.jdt.core.compiler ITerminalSymbols TokenNamenative

List of usage examples for org.eclipse.jdt.core.compiler ITerminalSymbols TokenNamenative

Introduction

In this page you can find the example usage for org.eclipse.jdt.core.compiler ITerminalSymbols TokenNamenative.

Prototype

int TokenNamenative

To view the source code for org.eclipse.jdt.core.compiler ITerminalSymbols TokenNamenative.

Click Source Link

Usage

From source file:com.google.googlejavaformat.java.ModifierOrderer.java

License:Apache License

/**
 * Returns the {@link javax.lang.model.element.Modifier} for the given token id, or {@code null}.
 *///from   w w  w. ja  v  a  2  s  .  c o  m
static Modifier getModifier(int tokenId) {
    switch (tokenId) {
    case ITerminalSymbols.TokenNamepublic:
        return Modifier.PUBLIC;
    case ITerminalSymbols.TokenNameprotected:
        return Modifier.PROTECTED;
    case ITerminalSymbols.TokenNameprivate:
        return Modifier.PRIVATE;
    case ITerminalSymbols.TokenNameabstract:
        return Modifier.ABSTRACT;
    case ITerminalSymbols.TokenNamestatic:
        return Modifier.STATIC;
    case ITerminalSymbols.TokenNamedefault:
        return Modifier.DEFAULT;
    case ITerminalSymbols.TokenNamefinal:
        return Modifier.FINAL;
    case ITerminalSymbols.TokenNametransient:
        return Modifier.TRANSIENT;
    case ITerminalSymbols.TokenNamevolatile:
        return Modifier.VOLATILE;
    case ITerminalSymbols.TokenNamesynchronized:
        return Modifier.SYNCHRONIZED;
    case ITerminalSymbols.TokenNamenative:
        return Modifier.NATIVE;
    case ITerminalSymbols.TokenNamestrictfp:
        return Modifier.STRICTFP;
    default:
        return null;
    }
}