private ArrayType convertToArray(Type elementType, int sourceStart, int length, int dimensions, org.eclipse.jdt.internal.compiler.ast.Annotation[][] annotationsOnDimensions) { ArrayType arrayType = this.ast.newArrayType(elementType, dimensions); if (length > 0) arrayType.setSourceRange(sourceStart, length); if (this.ast.apiLevel() < AST.JLS8_INTERNAL) { if (annotationsOnDimensions != null) { arrayType.setFlags(arrayType.getFlags() | ASTNode.MALFORMED); } ArrayType subarrayType = arrayType; int index = dimensions - 1; int arrayEnd = retrieveProperRightBracketPosition(dimensions, sourceStart); while (index > 0) { subarrayType = (ArrayType) componentType(subarrayType); int end = retrieveProperRightBracketPosition(index, sourceStart); subarrayType.setSourceRange(sourceStart, end - sourceStart + 1); index--; } if (length < arrayEnd - sourceStart) arrayType.setSourceRange(sourceStart, arrayEnd - sourceStart + 1); return arrayType; } setTypeAnnotationsAndSourceRangeOnArray(arrayType, annotationsOnDimensions); return arrayType; }
private ArrayType convertToArray(Type elementType, int sourceStart, int length, int dimensions, org.eclipse.jdt.internal.compiler.ast.Annotation[][] annotationsOnDimensions) { ArrayType arrayType = this.ast.newArrayType(elementType, dimensions); if (length > 0) arrayType.setSourceRange(sourceStart, length); if (this.ast.apiLevel() < AST.JLS8_INTERNAL) { if (annotationsOnDimensions != null) { arrayType.setFlags(arrayType.getFlags() | ASTNode.MALFORMED); } ArrayType subarrayType = arrayType; int index = dimensions - 1; int arrayEnd = retrieveProperRightBracketPosition(dimensions, sourceStart); while (index > 0) { subarrayType = (ArrayType) componentType(subarrayType); int end = retrieveProperRightBracketPosition(index, sourceStart); subarrayType.setSourceRange(sourceStart, end - sourceStart + 1); index--; } if (length < arrayEnd - sourceStart) arrayType.setSourceRange(sourceStart, arrayEnd - sourceStart + 1); return arrayType; } setTypeAnnotationsAndSourceRangeOnArray(arrayType, annotationsOnDimensions); return arrayType; }
private ArrayType convertToArray(Type elementType, int sourceStart, int length, int dimensions, org.eclipse.jdt.internal.compiler.ast.Annotation[][] annotationsOnDimensions) { ArrayType arrayType = this.ast.newArrayType(elementType, dimensions); if (length > 0) arrayType.setSourceRange(sourceStart, length); if (this.ast.apiLevel() < AST.JLS8) { if (annotationsOnDimensions != null) { arrayType.setFlags(arrayType.getFlags() | ASTNode.MALFORMED); } ArrayType subarrayType = arrayType; int index = dimensions - 1; int arrayEnd = retrieveProperRightBracketPosition(dimensions, sourceStart); while (index > 0) { subarrayType = (ArrayType) componentType(subarrayType); int end = retrieveProperRightBracketPosition(index, sourceStart); subarrayType.setSourceRange(sourceStart, end - sourceStart + 1); index--; } if (length < arrayEnd - sourceStart) arrayType.setSourceRange(sourceStart, arrayEnd - sourceStart + 1); return arrayType; } setTypeAnnotationsAndSourceRangeOnArray(arrayType, annotationsOnDimensions); return arrayType; }
private ArrayType convertToArray(Type elementType, int sourceStart, int length, int dimensions, org.eclipse.jdt.internal.compiler.ast.Annotation[][] annotationsOnDimensions) { ArrayType arrayType = this.ast.newArrayType(elementType, dimensions); if (length > 0) arrayType.setSourceRange(sourceStart, length); if (this.ast.apiLevel() < AST.JLS8) { if (annotationsOnDimensions != null) { arrayType.setFlags(arrayType.getFlags() | ASTNode.MALFORMED); } ArrayType subarrayType = arrayType; int index = dimensions - 1; int arrayEnd = retrieveProperRightBracketPosition(dimensions, sourceStart); while (index > 0) { subarrayType = (ArrayType) componentType(subarrayType); int end = retrieveProperRightBracketPosition(index, sourceStart); subarrayType.setSourceRange(sourceStart, end - sourceStart + 1); index--; } if (length < arrayEnd - sourceStart) arrayType.setSourceRange(sourceStart, arrayEnd - sourceStart + 1); return arrayType; } setTypeAnnotationsAndSourceRangeOnArray(arrayType, annotationsOnDimensions); return arrayType; }
private ArrayType convertToArray(Type elementType, int sourceStart, int length, int dimensions, org.eclipse.jdt.internal.compiler.ast.Annotation[][] annotationsOnDimensions) { ArrayType arrayType = this.ast.newArrayType(elementType, dimensions); if (length > 0) arrayType.setSourceRange(sourceStart, length); if (this.ast.apiLevel() < AST.JLS8) { if (annotationsOnDimensions != null) { arrayType.setFlags(arrayType.getFlags() | ASTNode.MALFORMED); } ArrayType subarrayType = arrayType; int index = dimensions - 1; int arrayEnd = retrieveProperRightBracketPosition(dimensions, sourceStart); while (index > 0) { subarrayType = (ArrayType) componentType(subarrayType); int end = retrieveProperRightBracketPosition(index, sourceStart); subarrayType.setSourceRange(sourceStart, end - sourceStart + 1); index--; } if (length < arrayEnd - sourceStart) arrayType.setSourceRange(sourceStart, arrayEnd - sourceStart + 1); return arrayType; } setTypeAnnotationsAndSourceRangeOnArray(arrayType, annotationsOnDimensions); return arrayType; }
if (expression.annotationsOnDimensions != null) { if (this.ast.apiLevel() < AST.JLS8_INTERNAL) { arrayType.setFlags(arrayType.getFlags() | ASTNode.MALFORMED); } else { setTypeAnnotationsAndSourceRangeOnArray(arrayType, expression.annotationsOnDimensions);
if (expression.annotationsOnDimensions != null) { if (this.ast.apiLevel() < AST.JLS8) { arrayType.setFlags(arrayType.getFlags() | ASTNode.MALFORMED); } else { setTypeAnnotationsAndSourceRangeOnArray(arrayType, expression.annotationsOnDimensions);
if (expression.annotationsOnDimensions != null) { if (this.ast.apiLevel() < AST.JLS8) { arrayType.setFlags(arrayType.getFlags() | ASTNode.MALFORMED); } else { setTypeAnnotationsAndSourceRangeOnArray(arrayType, expression.annotationsOnDimensions);
if (expression.annotationsOnDimensions != null) { if (this.ast.apiLevel() < AST.JLS8_INTERNAL) { arrayType.setFlags(arrayType.getFlags() | ASTNode.MALFORMED); } else { setTypeAnnotationsAndSourceRangeOnArray(arrayType, expression.annotationsOnDimensions);
if (expression.annotationsOnDimensions != null) { if (this.ast.apiLevel() < AST.JLS8) { arrayType.setFlags(arrayType.getFlags() | ASTNode.MALFORMED); } else { setTypeAnnotationsAndSourceRangeOnArray(arrayType, expression.annotationsOnDimensions);