@Override public boolean visit(Initializer initializer, MethodScope scope) { CtAnonymousExecutable b = factory.Core().createAnonymousExecutable(); if (initializer.isStatic()) { b.addModifier(ModifierKind.STATIC); } context.enter(b, initializer); return true; }
/** * @see org.eclipse.jdt.internal.compiler.ASTVisitor#visit(org.eclipse.jdt.internal.compiler.ast.Initializer, org.eclipse.jdt.internal.compiler.lookup.MethodScope) */ public boolean visit(Initializer initializer, MethodScope scope) { if (initializer.isStatic()) { this.scribe.printNextToken(TerminalTokens.TokenNamestatic); } initializer.block.traverse(this, scope); return false; }
/** * @see org.eclipse.jdt.internal.compiler.ASTVisitor#visit(org.eclipse.jdt.internal.compiler.ast.Initializer, org.eclipse.jdt.internal.compiler.lookup.MethodScope) */ public boolean visit(Initializer initializer, MethodScope scope) { if (initializer.isStatic()) { this.scribe.printNextToken(TerminalTokens.TokenNamestatic); } initializer.block.traverse(this, scope); return false; }
/** * @see org.eclipse.jdt.internal.compiler.ASTVisitor#visit(org.eclipse.jdt.internal.compiler.ast.Initializer, org.eclipse.jdt.internal.compiler.lookup.MethodScope) */ public boolean visit(Initializer initializer, MethodScope scope) { if (initializer.isStatic()) { this.scribe.printNextToken(TerminalTokens.TokenNamestatic); } initializer.block.traverse(this, scope); return false; }
/** Method used only by DOM to support bindings of initializers. */ public MethodBinding getMethodBinding() { if (this.methodBinding == null) { Scope scope = this.block.scope; this.methodBinding = isStatic() ? new MethodBinding(ClassFileConstants.AccStatic, CharOperation.NO_CHAR, TypeBinding.VOID, Binding.NO_PARAMETERS, Binding.NO_EXCEPTIONS, scope.enclosingSourceType()) : new MethodBinding(0, CharOperation.NO_CHAR, TypeBinding.VOID, Binding.NO_PARAMETERS, Binding.NO_EXCEPTIONS, scope.enclosingSourceType()); } return this.methodBinding; }
/** Method used only by DOM to support bindings of initializers. */ public MethodBinding getMethodBinding() { if (this.methodBinding == null) { Scope scope = this.block.scope; this.methodBinding = isStatic() ? new MethodBinding(ClassFileConstants.AccStatic, CharOperation.NO_CHAR, TypeBinding.VOID, Binding.NO_PARAMETERS, Binding.NO_EXCEPTIONS, scope.enclosingSourceType()) : new MethodBinding(0, CharOperation.NO_CHAR, TypeBinding.VOID, Binding.NO_PARAMETERS, Binding.NO_EXCEPTIONS, scope.enclosingSourceType()); } return this.methodBinding; }
/** Method used only by DOM to support bindings of initializers. */ public MethodBinding getMethodBinding() { if (this.methodBinding == null) { Scope scope = this.block.scope; this.methodBinding = isStatic() ? new MethodBinding(ClassFileConstants.AccStatic, CharOperation.NO_CHAR, TypeBinding.VOID, Binding.NO_PARAMETERS, Binding.NO_EXCEPTIONS, scope.enclosingSourceType()) : new MethodBinding(0, CharOperation.NO_CHAR, TypeBinding.VOID, Binding.NO_PARAMETERS, Binding.NO_EXCEPTIONS, scope.enclosingSourceType()); } return this.methodBinding; }
/** Method used only by DOM to support bindings of initializers. */ public MethodBinding getMethodBinding() { if (this.methodBinding == null) { Scope scope = this.block.scope; this.methodBinding = isStatic() ? new MethodBinding(ClassFileConstants.AccStatic, CharOperation.NO_CHAR, TypeBinding.VOID, Binding.NO_PARAMETERS, Binding.NO_EXCEPTIONS, scope.enclosingSourceType()) : new MethodBinding(0, CharOperation.NO_CHAR, TypeBinding.VOID, Binding.NO_PARAMETERS, Binding.NO_EXCEPTIONS, scope.enclosingSourceType()); } return this.methodBinding; }
/** Method used only by DOM to support bindings of initializers. */ public MethodBinding getMethodBinding() { if (this.methodBinding == null) { Scope scope = this.block.scope; this.methodBinding = isStatic() ? new MethodBinding(ClassFileConstants.AccStatic, CharOperation.NO_CHAR, TypeBinding.VOID, Binding.NO_PARAMETERS, Binding.NO_EXCEPTIONS, scope.enclosingSourceType()) : new MethodBinding(0, CharOperation.NO_CHAR, TypeBinding.VOID, Binding.NO_PARAMETERS, Binding.NO_EXCEPTIONS, scope.enclosingSourceType()); } return this.methodBinding; }
@Override public boolean visit(Initializer initializer, MethodScope scope) { CtAnonymousExecutable b = factory.Core().createAnonymousExecutable(); if (initializer.isStatic()) { b.addModifier(ModifierKind.STATIC); } context.enter(b, initializer); return true; }
public void resolve(MethodScope scope) { FieldBinding previousField = scope.initializedField; int previousFieldID = scope.lastVisibleFieldID; try { scope.initializedField = null; scope.lastVisibleFieldID = this.lastVisibleFieldID; if (isStatic()) { ReferenceBinding declaringType = scope.enclosingSourceType(); if (declaringType.isNestedType() && !declaringType.isStatic()) scope.problemReporter().innerTypesCannotDeclareStaticInitializers( declaringType, this); } if (this.block != null) this.block.resolve(scope); } finally { scope.initializedField = previousField; scope.lastVisibleFieldID = previousFieldID; } }
@Override public void resolve(MethodScope scope) { FieldBinding previousField = scope.initializedField; int previousFieldID = scope.lastVisibleFieldID; try { scope.initializedField = null; scope.lastVisibleFieldID = this.lastVisibleFieldID; if (isStatic()) { ReferenceBinding declaringType = scope.enclosingSourceType(); if (declaringType.isNestedType() && !declaringType.isStatic()) scope.problemReporter().innerTypesCannotDeclareStaticInitializers( declaringType, this); } if (this.block != null) this.block.resolve(scope); } finally { scope.initializedField = previousField; scope.lastVisibleFieldID = previousFieldID; } }
public void resolve(MethodScope scope) { FieldBinding previousField = scope.initializedField; int previousFieldID = scope.lastVisibleFieldID; try { scope.initializedField = null; scope.lastVisibleFieldID = this.lastVisibleFieldID; if (isStatic()) { ReferenceBinding declaringType = scope.enclosingSourceType(); if (declaringType.isNestedType() && !declaringType.isStatic()) scope.problemReporter().innerTypesCannotDeclareStaticInitializers( declaringType, this); } if (this.block != null) this.block.resolve(scope); } finally { scope.initializedField = previousField; scope.lastVisibleFieldID = previousFieldID; } }
public void resolve(MethodScope scope) { FieldBinding previousField = scope.initializedField; int previousFieldID = scope.lastVisibleFieldID; try { scope.initializedField = null; scope.lastVisibleFieldID = this.lastVisibleFieldID; if (isStatic()) { ReferenceBinding declaringType = scope.enclosingSourceType(); if (declaringType.isNestedType() && !declaringType.isStatic()) scope.problemReporter().innerTypesCannotDeclareStaticInitializers( declaringType, this); } if (this.block != null) this.block.resolve(scope); } finally { scope.initializedField = previousField; scope.lastVisibleFieldID = previousFieldID; } }
public void resolve(MethodScope scope) { FieldBinding previousField = scope.initializedField; int previousFieldID = scope.lastVisibleFieldID; try { scope.initializedField = null; scope.lastVisibleFieldID = this.lastVisibleFieldID; if (isStatic()) { ReferenceBinding declaringType = scope.enclosingSourceType(); if (declaringType.isNestedType() && !declaringType.isStatic()) scope.problemReporter().innerTypesCannotDeclareStaticInitializers( declaringType, this); } if (this.block != null) this.block.resolve(scope); } finally { scope.initializedField = previousField; scope.lastVisibleFieldID = previousFieldID; } }
public void resolve(MethodScope scope) { FieldBinding previousField = scope.initializedField; int previousFieldID = scope.lastVisibleFieldID; try { scope.initializedField = null; scope.lastVisibleFieldID = this.lastVisibleFieldID; if (isStatic()) { ReferenceBinding declaringType = scope.enclosingSourceType(); if (declaringType.isNestedType() && !declaringType.isStatic()) scope.problemReporter().innerTypesCannotDeclareStaticInitializers( declaringType, this); } if (this.block != null) this.block.resolve(scope); } finally { scope.initializedField = previousField; scope.lastVisibleFieldID = previousFieldID; } }
public void resolve(MethodScope scope) { FieldBinding previousField = scope.initializedField; int previousFieldID = scope.lastVisibleFieldID; try { scope.initializedField = null; scope.lastVisibleFieldID = this.lastVisibleFieldID; if (isStatic()) { ReferenceBinding declaringType = scope.enclosingSourceType(); if (declaringType.isNestedType() && !declaringType.isStatic()) scope.problemReporter().innerTypesCannotDeclareStaticInitializers( declaringType, this); } if (this.block != null) this.block.resolve(scope); } finally { scope.initializedField = previousField; scope.lastVisibleFieldID = previousFieldID; } }
public void resolve(MethodScope scope) { FieldBinding previousField = scope.initializedField; int previousFieldID = scope.lastVisibleFieldID; try { scope.initializedField = null; scope.lastVisibleFieldID = this.lastVisibleFieldID; if (isStatic()) { ReferenceBinding declaringType = scope.enclosingSourceType(); if (declaringType.isNestedType() && !declaringType.isStatic()) scope.problemReporter().innerTypesCannotDeclareStaticInitializers( declaringType, this); } if (this.block != null) this.block.resolve(scope); } finally { scope.initializedField = previousField; scope.lastVisibleFieldID = previousFieldID; } }
public void resolve(MethodScope scope) { FieldBinding previousField = scope.initializedField; int previousFieldID = scope.lastVisibleFieldID; try { scope.initializedField = null; scope.lastVisibleFieldID = this.lastVisibleFieldID; if (isStatic()) { ReferenceBinding declaringType = scope.enclosingSourceType(); if (declaringType.isNestedType() && !declaringType.isStatic()) scope.problemReporter().innerTypesCannotDeclareStaticInitializers( declaringType, this); } if (this.block != null) this.block.resolve(scope); } finally { scope.initializedField = previousField; scope.lastVisibleFieldID = previousFieldID; } }
public void resolve(MethodScope scope) { FieldBinding previousField = scope.initializedField; int previousFieldID = scope.lastVisibleFieldID; try { scope.initializedField = null; scope.lastVisibleFieldID = this.lastVisibleFieldID; if (isStatic()) { ReferenceBinding declaringType = scope.enclosingSourceType(); if (declaringType.isNestedType() && !declaringType.isStatic()) scope.problemReporter().innerTypesCannotDeclareStaticInitializers( declaringType, this); } if (this.block != null) this.block.resolve(scope); } finally { scope.initializedField = previousField; scope.lastVisibleFieldID = previousFieldID; } }