protected LocalDeclaration createLocalDeclaration(char[] localDeclarationName, int sourceStart, int sourceEnd) { return new LocalDeclaration(localDeclarationName, sourceStart, sourceEnd); } protected StringLiteral createStringLiteral(char[] token, int start, int end, int lineNumber) {
public void getAllAnnotationContexts(int targetType, int parameterIndex, List allAnnotationContexts) { AnnotationCollector collector = new AnnotationCollector(this, targetType, parameterIndex, allAnnotationContexts); this.traverse(collector, (BlockScope) null); }
public String toString(int tab) { return tabString(tab) + "Recovered local variable:\n" + this.localDeclaration.print(tab + 1, new StringBuffer(10)); //$NON-NLS-1$ } public Statement updatedStatement(int depth, Set knownTypes){
checkModifiers(); if (variableType != null) { if (variableType == TypeBinding.VOID) { CastExpression.checkNeedForAssignedCast(scope, variableType, (CastExpression) this.initialization); } else if (isBoxingCompatible(initializationType, variableType, this.initialization, scope)) { this.initialization.computeConversion(scope, variableType, initializationType); if (this.initialization instanceof CastExpression resolveAnnotations(scope, this.annotations, this.binding);
handleNonNullByDefault(scope, this.annotations, this); boolean isTypeNameVar = isTypeNameVar(scope); if (isTypeNameVar) { if ((this.bits & ASTNode.IsForeachElementVariable) == 0) { variableType = checkInferredLocalVariableInitializer(scope); variableTypeInferenceError = variableType != null; } else { checkModifiers(); if (variableType != null) { if (variableType == TypeBinding.VOID) { variableType = patchType(this.initialization.resolvedType); } else { variableTypeInferenceError = true; resolveAnnotations(scope, this.annotations, this.binding, true); } else if (isBoxingCompatible(initializationType, variableType, this.initialization, scope)) { this.initialization.computeConversion(scope, variableType, initializationType); if (this.initialization instanceof CastExpression resolveAnnotations(scope, this.annotations, this.binding, true); Annotation.isTypeUseCompatible(this.type, scope, this.annotations); validateNullAnnotations(scope);
handleNonNullByDefault(scope, this.annotations, this); checkModifiers(); if (variableType != null) { if (variableType == TypeBinding.VOID) { CastExpression.checkNeedForAssignedCast(scope, variableType, (CastExpression) this.initialization); } else if (isBoxingCompatible(initializationType, variableType, this.initialization, scope)) { this.initialization.computeConversion(scope, variableType, initializationType); if (this.initialization instanceof CastExpression resolveAnnotations(scope, this.annotations, this.binding, true); Annotation.isTypeUseCompatible(this.type, scope, this.annotations); if (!scope.validateNullAnnotation(this.binding.tagBits, this.type, this.annotations))
@Override public void resolve(BlockScope scope) { super.resolve(scope); throw new CompletionNodeFound(this, scope); }
public StringBuffer printStatement(int indent, StringBuffer output) { printIndent(indent, output).append("for ("); //$NON-NLS-1$ this.elementVariable.printAsExpression(0, output); output.append(" : ");//$NON-NLS-1$ if (this.collection != null) { this.collection.print(0, output).append(") "); //$NON-NLS-1$ } else { output.append(')'); } //block if (this.action == null) { output.append(';'); } else { output.append('\n'); this.action.printStatement(indent + 1, output); } return output; }
flowInfo = this.elementVariable.analyseCode(this.scope, flowContext, flowInfo); FlowInfo condInfo = this.collection.analyseCode(this.scope, flowContext, flowInfo.copy());
this.resourceExceptionLabels[i].placeStart(); if (i < resourceCount) { this.resources[i].generateCode(this.scope, codeStream); // Initialize resources ...
flowInfo = this.elementVariable.analyseCode(this.scope, flowContext, flowInfo); FlowInfo condInfo = this.collection.analyseCode(this.scope, flowContext, flowInfo.copy()); LocalVariableBinding elementVarBinding = this.elementVariable.binding; if (currentScope.compilerOptions().isAnnotationBasedNullAnalysisEnabled) { int nullStatus = this.elementVariable.checkAssignmentAgainstNullAnnotation(currentScope, flowContext, elementVarBinding, FlowInfo.UNKNOWN, this.collection, this.collectionElementType);
checkModifiers(); if (variableType != null) { if (variableType == TypeBinding.VOID) { CastExpression.checkNeedForAssignedCast(scope, variableType, (CastExpression) this.initialization); } else if (isBoxingCompatible(initializationType, variableType, this.initialization, scope)) { this.initialization.computeConversion(scope, variableType, initializationType); if (this.initialization instanceof CastExpression resolveAnnotations(scope, this.annotations, this.binding);
public void resolve(BlockScope scope) { super.resolve(scope); throw new SelectionNodeFound(this.binding); }
public StringBuffer printStatement(int indent, StringBuffer output) { printIndent(indent, output).append("for ("); //$NON-NLS-1$ this.elementVariable.printAsExpression(0, output); output.append(" : ");//$NON-NLS-1$ if (this.collection != null) { this.collection.print(0, output).append(") "); //$NON-NLS-1$ } else { output.append(')'); } //block if (this.action == null) { output.append(';'); } else { output.append('\n'); this.action.printStatement(indent + 1, output); } return output; }
flowInfo = this.elementVariable.analyseCode(this.scope, flowContext, flowInfo); FlowInfo condInfo = this.collection.analyseCode(this.scope, flowContext, flowInfo.copy());
this.resourceExceptionLabels[i].placeStart(); if (i < resourceCount) { this.resources[i].generateCode(this.scope, codeStream); // Initialize resources ...
checkModifiers(); if (variableType != null) { if (variableType == TypeBinding.VOID) { CastExpression.checkNeedForAssignedCast(scope, variableType, (CastExpression) this.initialization); } else if (isBoxingCompatible(initializationType, variableType, this.initialization, scope)) { this.initialization.computeConversion(scope, variableType, initializationType); if (this.initialization instanceof CastExpression resolveAnnotations(scope, this.annotations, this.binding); scope.validateNullAnnotation(this.binding.tagBits, this.type, this.annotations);
protected LocalDeclaration createLocalDeclaration(char[] localDeclarationName, int sourceStart, int sourceEnd) { return new LocalDeclaration(localDeclarationName, sourceStart, sourceEnd); } protected StringLiteral createStringLiteral(char[] token, int start, int end, int lineNumber) {
public void getAllAnnotationContexts(int targetType, int parameterIndex, List allAnnotationContexts) { AnnotationCollector collector = new AnnotationCollector(this, targetType, parameterIndex, allAnnotationContexts); this.traverse(collector, (BlockScope) null); }
public void resolve(BlockScope scope) { super.resolve(scope); throw new CompletionNodeFound(this, scope); }