Example usage for org.eclipse.jdt.internal.compiler.ast Initializer isStatic

List of usage examples for org.eclipse.jdt.internal.compiler.ast Initializer isStatic

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.compiler.ast Initializer isStatic.

Prototype

@Override
    public boolean isStatic() 

Source Link

Usage

From source file:spoon.support.builder.JDTTreeBuilder.java

License:Open Source License

@Override
public boolean visit(Initializer initializer, MethodScope scope) {
    CtAnonymousExecutable b = factory.Core().createAnonymousExecutable();
    if (initializer.isStatic())
        b.getModifiers().add(ModifierKind.STATIC);
    context.enter(b, initializer);/*from w  ww . j  a v  a2 s  .  c o  m*/
    return true;
}

From source file:spoon.support.compiler.jdt.JDTTreeBuilder.java

License:Open Source License

@Override
public boolean visit(Initializer initializer, MethodScope scope) {
    CtAnonymousExecutable b = factory.Core().createAnonymousExecutable();
    if (initializer.isStatic()) {
        b.addModifier(ModifierKind.STATIC);
    }//from  ww w  .j  av a2s. c  o m
    context.enter(b, initializer);
    return true;
}