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

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

Introduction

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

Prototype

public final void setFlags(int flags) 

Source Link

Document

Sets the flags associated with this node to the given value.

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/*  w w  w .j a va 2s .c  om*/
                .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);
    }
}