if (name.equals(new String(fieldBinding.readableName()))) { final String qualifiedNameOfParent = new String(referenceBinding.readableName()); final CtType parentOfField = referenceBinding.isClass() ? classFactory.create(qualifiedNameOfParent)
public void innerTypesCannotDeclareStaticInitializers(ReferenceBinding innerType, Initializer initializer) { this.handle( IProblem.CannotDefineStaticInitializerInLocalType, new String[] {new String(innerType.readableName())}, new String[] {new String(innerType.shortReadableName())}, initializer.sourceStart, initializer.sourceStart); } public void interfaceCannotHaveConstructors(ConstructorDeclaration constructor) {
public void containerAnnotationTypeMustHaveValue(ASTNode markerNode, ReferenceBinding containerAnnotationType) { this.handle( IProblem.ContainerAnnotationTypeMustHaveValue, new String[] {new String(containerAnnotationType.readableName())}, new String[] {new String(containerAnnotationType.shortReadableName())}, markerNode.sourceStart, markerNode.sourceEnd); } public void containerAnnotationTypeHasWrongValueType(ASTNode markerNode, ReferenceBinding containerAnnotationType, ReferenceBinding annotationType, TypeBinding returnType) {
public void unnecessaryEnclosingInstanceSpecification(Expression expression, ReferenceBinding targetType) { this.handle( IProblem.IllegalEnclosingInstanceSpecification, new String[]{ new String(targetType.readableName())}, new String[]{ new String(targetType.shortReadableName())}, expression.sourceStart, expression.sourceEnd); } public void unnecessaryInstanceof(InstanceOfExpression instanceofExpression, TypeBinding checkType) {
public void parameterLackingNullableAnnotation(Argument argument, ReferenceBinding declaringClass, char[][] inheritedAnnotationName) { this.handle( IProblem.ParameterLackingNullableAnnotation, new String[] { new String(declaringClass.readableName()), CharOperation.toString(inheritedAnnotationName)}, new String[] { new String(declaringClass.shortReadableName()), new String(inheritedAnnotationName[inheritedAnnotationName.length-1])}, argument.type.sourceStart, argument.type.sourceEnd); } public void parameterLackingNonnullAnnotation(Argument argument, ReferenceBinding declaringClass, char[][] inheritedAnnotationName) {
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 superclassMustBeAClass(SourceTypeBinding type, TypeReference superclassRef, ReferenceBinding superType) { this.handle( IProblem.SuperclassMustBeAClass, new String[] {new String(superType.readableName()), new String(type.sourceName())}, new String[] {new String(superType.shortReadableName()), new String(type.sourceName())}, superclassRef.sourceStart, superclassRef.sourceEnd); } public void superfluousSemicolon(int sourceStart, int sourceEnd) {
public void superinterfaceMustBeAnInterface(SourceTypeBinding type, TypeReference superInterfaceRef, ReferenceBinding superType) { this.handle( IProblem.SuperInterfaceMustBeAnInterface, new String[] {new String(superType.readableName()), new String(type.sourceName())}, new String[] {new String(superType.shortReadableName()), new String(type.sourceName())}, superInterfaceRef.sourceStart, superInterfaceRef.sourceEnd); } public void superinterfacesCollide(TypeBinding type, ASTNode decl, TypeBinding superType, TypeBinding inheritedSuperType) {
public void descriptorHasInvisibleType(FunctionalExpression expression, ReferenceBinding referenceBinding) { this.handle( IProblem.LambdaDescriptorMentionsUnmentionable, new String[] { new String(referenceBinding.readableName()) }, new String[] { new String(referenceBinding.shortReadableName()) }, expression.sourceStart, expression.diagnosticsSourceEnd()); }
public void cannotUseQualifiedEnumConstantInCaseLabel(Reference location, FieldBinding field) { this.handle( IProblem.IllegalQualifiedEnumConstantLabel, new String[]{ String.valueOf(field.declaringClass.readableName()), String.valueOf(field.name) }, new String[]{ String.valueOf(field.declaringClass.shortReadableName()), String.valueOf(field.name) }, location.sourceStart(), location.sourceEnd()); } public void cannotUseSuperInCodeSnippet(int start, int end) {
public void enumSwitchCannotTargetField(Reference reference, FieldBinding field) { this.handle( IProblem.EnumSwitchCannotTargetField, new String[]{ String.valueOf(field.declaringClass.readableName()), String.valueOf(field.name) }, new String[]{ String.valueOf(field.declaringClass.shortReadableName()), String.valueOf(field.name) }, nodeSourceStart(field, reference), nodeSourceEnd(field, reference)); } public void errorNoMethodFor(MessageSend messageSend, TypeBinding recType, TypeBinding[] params) {
public void methodMustOverride(AbstractMethodDeclaration method, long complianceLevel) { MethodBinding binding = method.binding; this.handle( complianceLevel == ClassFileConstants.JDK1_5 ? IProblem.MethodMustOverride : IProblem.MethodMustOverrideOrImplement, new String[] {new String(binding.selector), typesAsString(binding, false), new String(binding.declaringClass.readableName()), }, new String[] {new String(binding.selector), typesAsString(binding, true), new String(binding.declaringClass.shortReadableName()),}, method.sourceStart, method.sourceEnd); }
public void mustUseAStaticMethod(MessageSend messageSend, MethodBinding method) { this.handle( IProblem.StaticMethodRequested, new String[] {new String(method.declaringClass.readableName()), new String(method.selector), typesAsString(method, false)}, new String[] {new String(method.declaringClass.shortReadableName()), new String(method.selector), typesAsString(method, true)}, messageSend.sourceStart, messageSend.sourceEnd); } public void nativeMethodsCannotBeStrictfp(ReferenceBinding type, AbstractMethodDeclaration methodDecl) {
public void methodMustOverride(AbstractMethodDeclaration method, long complianceLevel) { MethodBinding binding = method.binding; this.handle( complianceLevel == ClassFileConstants.JDK1_5 ? IProblem.MethodMustOverride : IProblem.MethodMustOverrideOrImplement, new String[] {new String(binding.selector), typesAsString(binding, false), new String(binding.declaringClass.readableName()), }, new String[] {new String(binding.selector), typesAsString(binding, true), new String(binding.declaringClass.shortReadableName()),}, method.sourceStart, method.sourceEnd); }
public void illegalSuperCallBypassingOverride(InvocationSite location, MethodBinding targetMethod, ReferenceBinding overrider) { this.handle(IProblem.SuperCallCannotBypassOverride, new String[] { String.valueOf(targetMethod.readableName()), String.valueOf(targetMethod.declaringClass.readableName()), String.valueOf(overrider.readableName()) }, new String[] { String.valueOf(targetMethod.shortReadableName()), String.valueOf(targetMethod.declaringClass.shortReadableName()), String.valueOf(overrider.shortReadableName()) }, location.sourceStart(), location.sourceEnd()); } public void disallowedTargetForContainerAnnotation(Annotation annotation, TypeBinding containerAnnotationType) {
public void indirectAccessToStaticMethod(ASTNode location, MethodBinding method) { int severity = computeSeverity(IProblem.IndirectAccessToStaticMethod); if (severity == ProblemSeverities.Ignore) return; this.handle( IProblem.IndirectAccessToStaticMethod, new String[] {new String(method.declaringClass.readableName()), new String(method.selector), typesAsString(method, false)}, new String[] {new String(method.declaringClass.shortReadableName()), new String(method.selector), typesAsString(method, true)}, severity, location.sourceStart, location.sourceEnd); } public void inheritedDefaultMethodConflictsWithOtherInherited(SourceTypeBinding type, MethodBinding defaultMethod, MethodBinding otherMethod) {
public void missingDeprecatedAnnotationForMethod(AbstractMethodDeclaration method) { int severity = computeSeverity(IProblem.MethodMissingDeprecatedAnnotation); if (severity == ProblemSeverities.Ignore) return; MethodBinding binding = method.binding; this.handle( IProblem.MethodMissingDeprecatedAnnotation, new String[] {new String(binding.selector), typesAsString(binding, false), new String(binding.declaringClass.readableName()), }, new String[] {new String(binding.selector), typesAsString(binding, true), new String(binding.declaringClass.shortReadableName()),}, severity, method.sourceStart, method.sourceEnd); }
public void finalMethodCannotBeOverridden(MethodBinding currentMethod, MethodBinding inheritedMethod) { this.handle( // Cannot override the final method from %1 // 8.4.3.3 - Final methods cannot be overridden or hidden. IProblem.FinalMethodCannotBeOverridden, new String[] {new String(inheritedMethod.declaringClass.readableName())}, new String[] {new String(inheritedMethod.declaringClass.shortReadableName())}, currentMethod.sourceStart(), currentMethod.sourceEnd()); } public void finalVariableBound(TypeVariableBinding typeVariable, TypeReference typeRef) {
public void visibilityConflict(MethodBinding currentMethod, MethodBinding inheritedMethod) { this.handle( // Cannot reduce the visibility of the inherited method from %1 // 8.4.6.3 - The access modifier of an hiding method must provide at least as much access as the hidden method. // 8.4.6.3 - The access modifier of an overiding method must provide at least as much access as the overriden method. IProblem.MethodReducesVisibility, new String[] {new String(inheritedMethod.declaringClass.readableName())}, new String[] {new String(inheritedMethod.declaringClass.shortReadableName())}, currentMethod.sourceStart(), currentMethod.sourceEnd()); } public void wildcardAssignment(TypeBinding variableType, TypeBinding expressionType, ASTNode location) {
public void illegalQualifiedParameterizedTypeAllocation(TypeReference qualifiedTypeReference, TypeBinding allocatedType) { this.handle( IProblem.IllegalQualifiedParameterizedTypeAllocation, new String[] { new String(allocatedType.readableName()), new String(allocatedType.enclosingType().readableName()), }, new String[] { new String(allocatedType.shortReadableName()), new String(allocatedType.enclosingType().shortReadableName()), }, qualifiedTypeReference.sourceStart, qualifiedTypeReference.sourceEnd); } public void illegalStaticModifierForMemberType(SourceTypeBinding type) {