Example usage for org.eclipse.jdt.core.dom EnumConstantDeclaration getFlags

List of usage examples for org.eclipse.jdt.core.dom EnumConstantDeclaration getFlags

Introduction

In this page you can find the example usage for org.eclipse.jdt.core.dom EnumConstantDeclaration getFlags.

Prototype

public final int getFlags() 

Source Link

Document

Returns the flags associated with this node.

Usage

From source file:org.eclipse.jdt.core.dom.ASTConverter.java

License:Open Source License

protected void setModifiers(EnumConstantDeclaration enumConstantDeclaration,
        org.eclipse.jdt.internal.compiler.ast.FieldDeclaration fieldDeclaration) {
    switch (this.ast.apiLevel) {
    case AST.JLS2_INTERNAL:
        enumConstantDeclaration/*from w  ww .j  a  v  a 2 s . c o  m*/
                .internalSetModifiers(fieldDeclaration.modifiers & ExtraCompilerModifiers.AccJustFlag);
        if (fieldDeclaration.annotations != null) {
            enumConstantDeclaration.setFlags(enumConstantDeclaration.getFlags() | ASTNode.MALFORMED);
        }
        break;
    default:
        this.scanner.resetTo(fieldDeclaration.declarationSourceStart, fieldDeclaration.sourceStart);
        this.setModifiers(enumConstantDeclaration, fieldDeclaration.annotations, fieldDeclaration.sourceStart);
    }
}