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); }
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 potentialNullUnboxing(ASTNode expression, TypeBinding boxType) { String[] arguments = new String[] { String.valueOf(boxType.readableName()) }; String[] argumentsShort = new String[] { String.valueOf(boxType.shortReadableName()) }; this.handle(IProblem.PotentialNullUnboxing, arguments, argumentsShort, expression.sourceStart, expression.sourceEnd); } public void nullUnboxing(ASTNode expression, TypeBinding boxType) {
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) {
private String shortAnnotatedTypeName(TypeBinding type, char[][] annotationName) { if ((type.tagBits & TagBits.AnnotationNullMASK) != 0) return String.valueOf(type.nullAnnotatedReadableName(this.options, true)); int dims = 0; char[] typeName = type.shortReadableName(); char[] annotationDisplayName = annotationName[annotationName.length-1]; return internalAnnotatedTypeName(annotationDisplayName, typeName, dims); }
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) {
public void anonymousDiamondWithNonDenotableTypeArguments(TypeReference type, TypeBinding tb) { this.handle( IProblem.NonDenotableTypeArgumentForAnonymousDiamond, new String[]{new String(tb.leafComponentType().shortReadableName()), type.toString()}, new String[]{new String(tb.leafComponentType().shortReadableName()), type.toString()}, type.sourceStart, type.sourceEnd); } public void redundantSpecificationOfTypeArguments(ASTNode location, TypeBinding[] argumentTypes) {
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) {
/** For 18.4: "Let Z1, ..., Zn be fresh type variables" use capture bindings. */ private CaptureBinding18 freshCapture(InferenceVariable variable) { int id = this.captureId++; char[] sourceName = CharOperation.concat("Z".toCharArray(), '#', String.valueOf(id).toCharArray(), '-', variable.sourceName); //$NON-NLS-1$ int start = this.currentInvocation != null ? this.currentInvocation.sourceStart() : 0; int end = this.currentInvocation != null ? this.currentInvocation.sourceEnd() : 0; return new CaptureBinding18(this.scope.enclosingSourceType(), sourceName, variable.typeParameter.shortReadableName(), start, end, id, this.environment); } // === ===