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

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

Introduction

In this page you can find the example usage for org.eclipse.jdt.core.dom FieldDeclaration 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

/**
 * @param fieldDeclaration//from   w  w w .ja  va 2  s  .c om
 * @param fieldDecl
 */
protected void setModifiers(FieldDeclaration fieldDeclaration,
        org.eclipse.jdt.internal.compiler.ast.FieldDeclaration fieldDecl) {
    switch (this.ast.apiLevel) {
    case AST.JLS2_INTERNAL:
        fieldDeclaration.internalSetModifiers(fieldDecl.modifiers & ExtraCompilerModifiers.AccJustFlag);
        if (fieldDecl.annotations != null) {
            fieldDeclaration.setFlags(fieldDeclaration.getFlags() | ASTNode.MALFORMED);
        }
        break;
    default:
        this.scanner.resetTo(fieldDecl.declarationSourceStart, fieldDecl.sourceStart);
        this.setModifiers(fieldDeclaration, fieldDecl.annotations, fieldDecl.sourceStart);
    }
}