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

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

Introduction

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

/**
 * @param initializer//from  ww  w . jav  a2s  . co m
 * @param oldInitializer
 */
protected void setModifiers(Initializer initializer,
        org.eclipse.jdt.internal.compiler.ast.Initializer oldInitializer) {
    switch (this.ast.apiLevel) {
    case AST.JLS2_INTERNAL:
        initializer.internalSetModifiers(oldInitializer.modifiers & ExtraCompilerModifiers.AccJustFlag);
        if (oldInitializer.annotations != null) {
            initializer.setFlags(initializer.getFlags() | ASTNode.MALFORMED);
        }
        break;
    default:
        this.scanner.resetTo(oldInitializer.declarationSourceStart, oldInitializer.bodyStart);
        this.setModifiers(initializer, oldInitializer.annotations, oldInitializer.bodyStart);
    }
}