public final void addAnonymousType(TypeDeclaration anonymousType, ReferenceBinding superBinding) { ClassScope anonymousClassScope = new ClassScope(this, anonymousType); anonymousClassScope.buildAnonymousTypeBinding( enclosingSourceType(), superBinding); }
public final void addAnonymousType(TypeDeclaration anonymousType, ReferenceBinding superBinding) { ClassScope anonymousClassScope = new ClassScope(this, anonymousType); anonymousClassScope.buildAnonymousTypeBinding( enclosingSourceType(), superBinding); }
public final void addAnonymousType(TypeDeclaration anonymousType, ReferenceBinding superBinding) { ClassScope anonymousClassScope = new ClassScope(this, anonymousType); anonymousClassScope.buildAnonymousTypeBinding( enclosingSourceType(), superBinding); }
public final void addAnonymousType(TypeDeclaration anonymousType, ReferenceBinding superBinding) { ClassScope anonymousClassScope = new ClassScope(this, anonymousType); anonymousClassScope.buildAnonymousTypeBinding( enclosingSourceType(), superBinding); /* Tag any enclosing lambdas as instance capturing. Strictly speaking they need not be, unless the local/anonymous type references enclosing instance state. but the types themselves track enclosing types regardless of whether the state is accessed or not. This creates a mismatch in expectations in code generation time, if we choose to make the lambda method static. To keep things simple and avoid a messy rollback, we force the lambda to be an instance method under this situation. However if per source, the lambda occurs in a static context, we would generate a static synthetic method. */ MethodScope methodScope = methodScope(); while (methodScope != null && methodScope.referenceContext instanceof LambdaExpression) { LambdaExpression lambda = (LambdaExpression) methodScope.referenceContext; if (!lambda.scope.isStatic && !lambda.scope.isConstructorCall) { lambda.shouldCaptureInstance = true; } methodScope = methodScope.enclosingMethodScope(); } }
public final void addAnonymousType(TypeDeclaration anonymousType, ReferenceBinding superBinding) { ClassScope anonymousClassScope = new ClassScope(this, anonymousType); anonymousClassScope.buildAnonymousTypeBinding( enclosingSourceType(), superBinding); /* Tag any enclosing lambdas as instance capturing. Strictly speaking they need not be, unless the local/anonymous type references enclosing instance state. but the types themselves track enclosing types regardless of whether the state is accessed or not. This creates a mismatch in expectations in code generation time, if we choose to make the lambda method static. To keep things simple and avoid a messy rollback, we force the lambda to be an instance method under this situation. However if per source, the lambda occurs in a static context, we would generate a static synthetic method. */ MethodScope methodScope = methodScope(); while (methodScope != null && methodScope.referenceContext instanceof LambdaExpression) { LambdaExpression lambda = (LambdaExpression) methodScope.referenceContext; if (!lambda.scope.isStatic && !lambda.scope.isConstructorCall) { lambda.shouldCaptureInstance = true; } methodScope = methodScope.enclosingMethodScope(); } }
public final void addAnonymousType(TypeDeclaration anonymousType, ReferenceBinding superBinding) { ClassScope anonymousClassScope = new ClassScope(this, anonymousType); anonymousClassScope.buildAnonymousTypeBinding( enclosingSourceType(), superBinding); /* Tag any enclosing lambdas as instance capturing. Strictly speaking they need not be, unless the local/anonymous type references enclosing instance state. but the types themselves track enclosing types regardless of whether the state is accessed or not. This creates a mismatch in expectations in code generation time, if we choose to make the lambda method static. To keep things simple and avoid a messy rollback, we force the lambda to be an instance method under this situation. However if per source, the lambda occurs in a static context, we would generate a static synthetic method. */ MethodScope methodScope = methodScope(); while (methodScope != null && methodScope.referenceContext instanceof LambdaExpression) { LambdaExpression lambda = (LambdaExpression) methodScope.referenceContext; if (!lambda.scope.isStatic && !lambda.scope.isConstructorCall) { lambda.shouldCaptureInstance = true; } methodScope = methodScope.enclosingMethodScope(); } }
public final void addAnonymousType(TypeDeclaration anonymousType, ReferenceBinding superBinding) { ClassScope anonymousClassScope = new ClassScope(this, anonymousType); anonymousClassScope.buildAnonymousTypeBinding( enclosingSourceType(), superBinding); /* Tag any enclosing lambdas as instance capturing. Strictly speaking they need not be, unless the local/anonymous type references enclosing instance state. but the types themselves track enclosing types regardless of whether the state is accessed or not. This creates a mismatch in expectations in code generation time, if we choose to make the lambda method static. To keep things simple and avoid a messy rollback, we force the lambda to be an instance method under this situation. However if per source, the lambda occurs in a static context, we would generate a static synthetic method. */ MethodScope methodScope = methodScope(); while (methodScope != null && methodScope.referenceContext instanceof LambdaExpression) { LambdaExpression lambda = (LambdaExpression) methodScope.referenceContext; if (!lambda.scope.isStatic && !lambda.scope.isConstructorCall) { lambda.shouldCaptureInstance = true; } methodScope = methodScope.enclosingMethodScope(); } }
public final void addAnonymousType(TypeDeclaration anonymousType, ReferenceBinding superBinding) { ClassScope anonymousClassScope = new ClassScope(this, anonymousType); anonymousClassScope.buildAnonymousTypeBinding( enclosingSourceType(), superBinding); /* Tag any enclosing lambdas as instance capturing. Strictly speaking they need not be, unless the local/anonymous type references enclosing instance state. but the types themselves track enclosing types regardless of whether the state is accessed or not. This creates a mismatch in expectations in code generation time, if we choose to make the lambda method static. To keep things simple and avoid a messy rollback, we force the lambda to be an instance method under this situation. However if per source, the lambda occurs in a static context, we would generate a static synthetic method. */ MethodScope methodScope = methodScope(); while (methodScope != null && methodScope.referenceContext instanceof LambdaExpression) { LambdaExpression lambda = (LambdaExpression) methodScope.referenceContext; if (!lambda.scope.isStatic && !lambda.scope.isConstructorCall) { lambda.shouldCaptureInstance = true; } methodScope = methodScope.enclosingMethodScope(); } }
public final void addAnonymousType(TypeDeclaration anonymousType, ReferenceBinding superBinding) { ClassScope anonymousClassScope = new ClassScope(this, anonymousType); anonymousClassScope.buildAnonymousTypeBinding( enclosingSourceType(), superBinding); /* Tag any enclosing lambdas as instance capturing. Strictly speaking they need not be, unless the local/anonymous type references enclosing instance state. but the types themselves track enclosing types regardless of whether the state is accessed or not. This creates a mismatch in expectations in code generation time, if we choose to make the lambda method static. To keep things simple and avoid a messy rollback, we force the lambda to be an instance method under this situation. However if per source, the lambda occurs in a static context, we would generate a static synthetic method. */ MethodScope methodScope = methodScope(); while (methodScope != null && methodScope.referenceContext instanceof LambdaExpression) { LambdaExpression lambda = (LambdaExpression) methodScope.referenceContext; if (!lambda.scope.isStatic && !lambda.scope.isConstructorCall) { lambda.shouldCaptureInstance = true; } methodScope = methodScope.enclosingMethodScope(); } }
public final void addAnonymousType(TypeDeclaration anonymousType, ReferenceBinding superBinding) { ClassScope anonymousClassScope = new ClassScope(this, anonymousType); anonymousClassScope.buildAnonymousTypeBinding( enclosingSourceType(), superBinding); /* Tag any enclosing lambdas as instance capturing. Strictly speaking they need not be, unless the local/anonymous type references enclosing instance state. but the types themselves track enclosing types regardless of whether the state is accessed or not. This creates a mismatch in expectations in code generation time, if we choose to make the lambda method static. To keep things simple and avoid a messy rollback, we force the lambda to be an instance method under this situation. However if per source, the lambda occurs in a static context, we would generate a static synthetic method. */ MethodScope methodScope = methodScope(); while (methodScope != null && methodScope.referenceContext instanceof LambdaExpression) { LambdaExpression lambda = (LambdaExpression) methodScope.referenceContext; if (!lambda.scope.isStatic && !lambda.scope.isConstructorCall) { lambda.shouldCaptureInstance = true; } methodScope = methodScope.enclosingMethodScope(); } }
public final void addAnonymousType(TypeDeclaration anonymousType, ReferenceBinding superBinding) { ClassScope anonymousClassScope = new ClassScope(this, anonymousType); anonymousClassScope.buildAnonymousTypeBinding( enclosingSourceType(), superBinding); /* Tag any enclosing lambdas as instance capturing. Strictly speaking they need not be, unless the local/anonymous type references enclosing instance state. but the types themselves track enclosing types regardless of whether the state is accessed or not. This creates a mismatch in expectations in code generation time, if we choose to make the lambda method static. To keep things simple and avoid a messy rollback, we force the lambda to be an instance method under this situation. However if per source, the lambda occurs in a static context, we would generate a static synthetic method. */ MethodScope methodScope = methodScope(); while (methodScope != null && methodScope.referenceContext instanceof LambdaExpression) { LambdaExpression lambda = (LambdaExpression) methodScope.referenceContext; if (!lambda.scope.isStatic && !lambda.scope.isConstructorCall) { lambda.shouldCaptureInstance = true; } methodScope = methodScope.enclosingMethodScope(); } }