@Override public char[] readableName() /* java.lang.Object[] */ { char[] brackets = new char[this.dimensions * 2]; for (int i = this.dimensions * 2 - 1; i >= 0; i -= 2) { brackets[i] = ']'; brackets[i - 1] = '['; } return CharOperation.concat(this.leafComponentType.readableName(), brackets); }
public void fieldFreeTypeVariableReference(FieldBinding variable, long position) { char[][] nullableName = this.options.nullableAnnotationName; String[] arguments = new String[] {new String(variable.type.readableName()), new String(nullableName[nullableName.length-1])}; this.handle( IProblem.UncheckedAccessOfValueOfFreeTypeVariable, arguments, arguments, (int)(position >>> 32), (int)position); }
public void constructedArrayIncompatible(ReferenceExpression expression, TypeBinding receiverType, TypeBinding returnType) { this.handle( IProblem.ConstructedArrayIncompatible, new String[] { new String(receiverType.readableName()), new String(returnType.readableName()) }, new String[] { new String(receiverType.shortReadableName()), new String(returnType.shortReadableName()) }, expression.sourceStart, expression.sourceEnd); }
@Override public String toString() { boolean isBound = this.right.isProperType(true); StringBuffer buf = new StringBuffer(); buf.append(isBound ? "TypeBound " : "Dependency "); //$NON-NLS-1$ //$NON-NLS-2$ buf.append(this.left.sourceName); buf.append(relationToString(this.relation)); buf.append(this.right.readableName()); return buf.toString(); } }
public void missingValueForAnnotationMember(Annotation annotation, char[] memberName) { String memberString = new String(memberName); this.handle( IProblem.MissingValueForAnnotationMember, new String[] {new String(annotation.resolvedType.readableName()), memberString }, new String[] {new String(annotation.resolvedType.shortReadableName()), memberString}, annotation.sourceStart, annotation.sourceEnd); } public void mustDefineDimensionsOrInitializer(ArrayAllocationExpression expression) {
public void missingValueForAnnotationMember(Annotation annotation, char[] memberName) { String memberString = new String(memberName); this.handle( IProblem.MissingValueForAnnotationMember, new String[] {new String(annotation.resolvedType.readableName()), memberString }, new String[] {new String(annotation.resolvedType.shortReadableName()), memberString}, annotation.sourceStart, annotation.sourceEnd); } public void mustDefineDimensionsOrInitializer(ArrayAllocationExpression expression) {
public void anonymousClassCannotExtendFinalClass(TypeReference reference, TypeBinding type) { this.handle( IProblem.AnonymousClassCannotExtendFinalClass, new String[] {new String(type.readableName())}, new String[] {new String(type.shortReadableName())}, reference.sourceStart, reference.sourceEnd); } public void argumentTypeCannotBeVoid(ASTNode methodDecl, Argument arg) {
public void cannotThrowType(ASTNode exception, TypeBinding expectedType) { this.handle( IProblem.CannotThrowType, new String[] {new String(expectedType.readableName())}, new String[] {new String(expectedType.shortReadableName())}, exception.sourceStart, exception.sourceEnd); } // https://bugs.eclipse.org/bugs/show_bug.cgi?id=391092
public void duplicateAnnotation(Annotation annotation, long sourceLevel) { this.handle( sourceLevel >= ClassFileConstants.JDK1_8 ? IProblem.DuplicateAnnotationNotMarkedRepeatable : IProblem.DuplicateAnnotation, new String[] {new String(annotation.resolvedType.readableName())}, new String[] {new String(annotation.resolvedType.shortReadableName())}, annotation.sourceStart, annotation.sourceEnd); } public void duplicateAnnotationValue(TypeBinding annotationType, MemberValuePair memberValuePair) {
public void illegalAnnotationForBaseType(Annotation annotation, TypeBinding type) { String[] args = new String[] { new String(annotation.resolvedType.shortReadableName()), new String(type.readableName()) }; this.handle(IProblem.IllegalAnnotationForBaseType, args, args, annotation.sourceStart, annotation.sourceEnd); }
public void unhandledException(TypeBinding exceptionType, ReferenceExpression location) { this.handle(IProblem.UnhandledException, new String[] {new String(exceptionType.readableName())}, new String[] {new String(exceptionType.shortReadableName())}, location.sourceStart, location.sourceEnd); }
public void duplicateAnnotation(Annotation annotation, long sourceLevel) { this.handle( sourceLevel >= ClassFileConstants.JDK1_8 ? IProblem.DuplicateAnnotationNotMarkedRepeatable : IProblem.DuplicateAnnotation, new String[] {new String(annotation.resolvedType.readableName())}, new String[] {new String(annotation.resolvedType.shortReadableName())}, annotation.sourceStart, annotation.sourceEnd); } public void duplicateAnnotationValue(TypeBinding annotationType, MemberValuePair memberValuePair) {
public void unhandledException(TypeBinding exceptionType, ReferenceExpression location) { this.handle(IProblem.UnhandledException, new String[] {new String(exceptionType.readableName())}, new String[] {new String(exceptionType.shortReadableName())}, location.sourceStart, location.sourceEnd); }
public void superinterfacesCollide(TypeBinding type, ASTNode decl, TypeBinding superType, TypeBinding inheritedSuperType) { this.handle( IProblem.SuperInterfacesCollide, new String[] {new String(superType.readableName()), new String(inheritedSuperType.readableName()), new String(type.sourceName())}, new String[] {new String(superType.shortReadableName()), new String(inheritedSuperType.shortReadableName()), new String(type.sourceName())}, decl.sourceStart, decl.sourceEnd); } public void superTypeCannotUseWildcard(SourceTypeBinding type, TypeReference superclass, TypeBinding superTypeBinding) {
public void repeatableAnnotationWithRepeatingContainer(Annotation annotation, ReferenceBinding containerType) { this.handle( IProblem.RepeatableAnnotationWithRepeatingContainerAnnotation, new String[] {new String(annotation.resolvedType.readableName()), new String(containerType.readableName())}, new String[] {new String(annotation.resolvedType.shortReadableName()), new String(containerType.shortReadableName())}, annotation.sourceStart, annotation.sourceEnd); }
public void unsafeGenericArrayForVarargs(TypeBinding leafComponentType, ASTNode location) { int severity = computeSeverity(IProblem.UnsafeGenericArrayForVarargs); if (severity == ProblemSeverities.Ignore) return; this.handle( IProblem.UnsafeGenericArrayForVarargs, new String[]{ new String(leafComponentType.readableName())}, new String[]{ new String(leafComponentType.shortReadableName())}, severity, location.sourceStart, location.sourceEnd); } public void unsafeRawFieldAssignment(FieldBinding field, TypeBinding expressionType, ASTNode location) {
ref.setSimpleName(new String(binding.readableName())); final CtReference declaring = this.getDeclaringReferenceFromImports(binding.sourceName()); setPackageOrDeclaringType(ref, declaring);
public void invalidOperator(UnaryExpression expression, TypeBinding type) { this.handle( IProblem.InvalidOperator, new String[] {expression.operatorToString(), new String(type.readableName())}, new String[] {expression.operatorToString(), new String(type.shortReadableName())}, expression.sourceStart, expression.sourceEnd); } public void invalidParameterizedExceptionType(TypeBinding exceptionType, ASTNode location) {
public void invalidOperator(UnaryExpression expression, TypeBinding type) { this.handle( IProblem.InvalidOperator, new String[] {expression.operatorToString(), new String(type.readableName())}, new String[] {expression.operatorToString(), new String(type.shortReadableName())}, expression.sourceStart, expression.sourceEnd); } public void invalidParameterizedExceptionType(TypeBinding exceptionType, ASTNode location) {
public void notAnnotationType(TypeBinding actualType, ASTNode location) { this.handle( IProblem.NotAnnotationType, new String[] {new String(actualType.leafComponentType().readableName())}, new String[] {new String(actualType.leafComponentType().shortReadableName())}, location.sourceStart, location.sourceEnd); } public void typeMismatchError(TypeBinding actualType, TypeBinding expectedType, ASTNode location, ASTNode expectingLocation) {