public boolean visit(SingleNameReference name, BlockScope skope) { Binding local = skope.getBinding(name.getName(), ReferenceExpression.this); if (local instanceof LocalVariableBinding) { LocalVariableBinding localBinding = (LocalVariableBinding) local; if (!localBinding.isFinal() && !localBinding.isEffectivelyFinal()) { this.accessesnonFinalOuterLocals = true; } } return false; }
public boolean visit(SingleNameReference name, BlockScope skope) { Binding local = skope.getBinding(name.getName(), ReferenceExpression.this); if (local instanceof LocalVariableBinding) { LocalVariableBinding localBinding = (LocalVariableBinding) local; if (!localBinding.isFinal() && !localBinding.isEffectivelyFinal()) { this.accessesnonFinalOuterLocals = true; } } return false; }
@Override public boolean visit(SingleNameReference name, BlockScope skope) { Binding local = skope.getBinding(name.getName(), ReferenceExpression.this); if (local instanceof LocalVariableBinding) { LocalVariableBinding localBinding = (LocalVariableBinding) local; if (!localBinding.isFinal() && !localBinding.isEffectivelyFinal()) { this.accessesnonFinalOuterLocals = true; } } return false; }
public boolean visit(SingleNameReference name, BlockScope skope) { Binding local = skope.getBinding(name.getName(), ReferenceExpression.this); if (local instanceof LocalVariableBinding) { LocalVariableBinding localBinding = (LocalVariableBinding) local; if (!localBinding.isFinal() && !localBinding.isEffectivelyFinal()) { this.accessesnonFinalOuterLocals = true; } } return false; }
public boolean visit(SingleNameReference name, BlockScope skope) { Binding local = skope.getBinding(name.getName(), ReferenceExpression.this); if (local instanceof LocalVariableBinding) { LocalVariableBinding localBinding = (LocalVariableBinding) local; if (!localBinding.isFinal() && !localBinding.isEffectivelyFinal()) { this.accessesnonFinalOuterLocals = true; } } return false; }
private void createParameter(SourceInfo info, LocalVariableBinding binding, String name, JMethod method) { JParameter param = new JParameter(info, name, typeMap.get(binding.type), binding.isFinal(), false, method); method.addParam(param); }
private JLocal createLocal(LocalDeclaration x) { LocalVariableBinding b = x.binding; TypeBinding resolvedType = x.type.resolvedType; JType localType; if (resolvedType.constantPoolName() != null) { localType = typeMap.get(resolvedType); } else { // Special case, a statically unreachable local type. localType = JNullType.INSTANCE; } SourceInfo info = makeSourceInfo(x); JLocal newLocal = JProgram.createLocal(info, intern(x.name), localType, b.isFinal(), curMethod.body); curMethod.locals.put(b, newLocal); return newLocal; }
protected void checkEffectiveFinality(LocalVariableBinding localBinding, Scope scope) { if ((this.bits & ASTNode.IsCapturedOuterLocal) != 0) { if (!localBinding.isFinal() && !localBinding.isEffectivelyFinal()) { scope.problemReporter().cannotReferToNonEffectivelyFinalOuterLocal(localBinding, this); throw new AbortMethod(scope.referenceCompilationUnit().compilationResult, null); } } } }
protected void checkEffectiveFinality(LocalVariableBinding localBinding, Scope scope) { if ((this.bits & ASTNode.IsCapturedOuterLocal) != 0) { if (!localBinding.isFinal() && !localBinding.isEffectivelyFinal()) { scope.problemReporter().cannotReferToNonEffectivelyFinalOuterLocal(localBinding, this); throw new AbortMethod(scope.referenceCompilationUnit().compilationResult, null); } } } }
protected void checkEffectiveFinality(LocalVariableBinding localBinding, Scope scope) { if ((this.bits & ASTNode.IsCapturedOuterLocal) != 0) { if (!localBinding.isFinal() && !localBinding.isEffectivelyFinal()) { scope.problemReporter().cannotReferToNonEffectivelyFinalOuterLocal(localBinding, this); throw new AbortMethod(scope.referenceCompilationUnit().compilationResult, null); } } } }
protected void checkEffectiveFinality(LocalVariableBinding localBinding, Scope scope) { if ((this.bits & ASTNode.IsCapturedOuterLocal) != 0) { if (!localBinding.isFinal() && !localBinding.isEffectivelyFinal()) { scope.problemReporter().cannotReferToNonEffectivelyFinalOuterLocal(localBinding, this); throw new AbortMethod(scope.referenceCompilationUnit().compilationResult, null); } } } }
protected void checkEffectiveFinality(LocalVariableBinding localBinding, Scope scope) { if ((this.bits & ASTNode.IsCapturedOuterLocal) != 0) { if (!localBinding.isFinal() && !localBinding.isEffectivelyFinal()) { scope.problemReporter().cannotReferToNonEffectivelyFinalOuterLocal(localBinding, this); throw new AbortMethod(scope.referenceCompilationUnit().compilationResult, null); } } } }
protected void checkEffectiveFinality(LocalVariableBinding localBinding, Scope scope) { if ((this.bits & ASTNode.IsCapturedOuterLocal) != 0) { if (!localBinding.isFinal() && !localBinding.isEffectivelyFinal()) { scope.problemReporter().cannotReferToNonEffectivelyFinalOuterLocal(localBinding, this); throw new AbortMethod(scope.referenceCompilationUnit().compilationResult, null); } } } }
this.bits &= ~ASTNode.FirstAssignmentToLocal; if (localBinding.isFinal()) { if ((this.bits & ASTNode.DepthMASK) == 0) {
this.binding.isFinal() ? this.initialization.constant.castTo((variableType.id << 4) + this.initialization.constant.typeID()) : Constant.NotAConstant);
this.binding.isFinal() ? this.initialization.constant.castTo((variableType.id << 4) + this.initialization.constant.typeID()) : Constant.NotAConstant);
this.bits &= ~ASTNode.FirstAssignmentToLocal; if (localBinding.isFinal()) { if ((this.bits & ASTNode.DepthMASK) == 0) {
this.bits &= ~ASTNode.FirstAssignmentToLocal; if (localBinding.isFinal()) { if ((this.bits & ASTNode.DepthMASK) == 0) {
this.binding.isFinal() ? this.initialization.constant.castTo((variableType.id << 4) + this.initialization.constant.typeID()) : Constant.NotAConstant);
this.binding.isFinal() ? this.initialization.constant.castTo((variableType.id << 4) + this.initialization.constant.typeID()) : Constant.NotAConstant);