@Override public Name getSimpleName() { return new NameImpl(_binding.shortReadableName()); }
@Override public Name getSimpleName() { return new NameImpl(_binding.shortReadableName()); }
@Override public Name getSimpleName() { return new NameImpl(_binding.shortReadableName()); }
@Override public Name getSimpleName() { return new NameImpl(_binding.shortReadableName()); }
@Override public Name getSimpleName() { return new NameImpl(_binding.shortReadableName()); }
@Override public Name getSimpleName() { return new NameImpl(_binding.shortReadableName()); }
public void cannotRedefineTypeArgumentNullity(TypeBinding typeVariable, Binding superElement, ASTNode location) { String[] arguments = new String[2]; String[] shortArguments = new String[2]; arguments[0] = String.valueOf(typeVariable.nullAnnotatedReadableName(this.options, false)); shortArguments[0] = String.valueOf(typeVariable.nullAnnotatedReadableName(this.options, true)); if (superElement instanceof MethodBinding) { ReferenceBinding declaringClass = ((MethodBinding) superElement).declaringClass; arguments[1] = String.valueOf(CharOperation.concat(declaringClass.readableName(), superElement.shortReadableName(), '.')); shortArguments[1] = String.valueOf(CharOperation.concat(declaringClass.shortReadableName(), superElement.shortReadableName(), '.')); } else { arguments[1] = String.valueOf(superElement.readableName()); shortArguments[1] = String.valueOf(superElement.shortReadableName()); } this.handle( IProblem.IllegalRedefinitionOfTypeVariable, arguments, shortArguments, location.sourceStart, location.sourceEnd); }
public void cannotRedefineTypeArgumentNullity(TypeBinding typeVariable, Binding superElement, ASTNode location) { String[] arguments = new String[2]; String[] shortArguments = new String[2]; arguments[0] = String.valueOf(typeVariable.nullAnnotatedReadableName(this.options, false)); shortArguments[0] = String.valueOf(typeVariable.nullAnnotatedReadableName(this.options, true)); if (superElement instanceof MethodBinding) { ReferenceBinding declaringClass = ((MethodBinding) superElement).declaringClass; arguments[1] = String.valueOf(CharOperation.concat(declaringClass.readableName(), superElement.shortReadableName(), '.')); shortArguments[1] = String.valueOf(CharOperation.concat(declaringClass.shortReadableName(), superElement.shortReadableName(), '.')); } else { arguments[1] = String.valueOf(superElement.readableName()); shortArguments[1] = String.valueOf(superElement.shortReadableName()); } this.handle( IProblem.IllegalRedefinitionOfTypeVariable, arguments, shortArguments, location.sourceStart, location.sourceEnd); }
public void cannotRedefineTypeArgumentNullity(TypeBinding typeVariable, Binding superElement, ASTNode location) { String[] arguments = new String[2]; String[] shortArguments = new String[2]; arguments[0] = String.valueOf(typeVariable.nullAnnotatedReadableName(this.options, false)); shortArguments[0] = String.valueOf(typeVariable.nullAnnotatedReadableName(this.options, true)); if (superElement instanceof MethodBinding) { ReferenceBinding declaringClass = ((MethodBinding) superElement).declaringClass; arguments[1] = String.valueOf(CharOperation.concat(declaringClass.readableName(), superElement.shortReadableName(), '.')); shortArguments[1] = String.valueOf(CharOperation.concat(declaringClass.shortReadableName(), superElement.shortReadableName(), '.')); } else { arguments[1] = String.valueOf(superElement.readableName()); shortArguments[1] = String.valueOf(superElement.shortReadableName()); } this.handle( IProblem.IllegalRedefinitionOfTypeVariable, arguments, shortArguments, location.sourceStart, location.sourceEnd); }
public void nullDefaultAnnotationIsRedundant(ASTNode location, Annotation[] annotations, Binding outer) { Annotation annotation = findAnnotation(annotations, TypeIds.BitNonNullByDefaultAnnotation); int start = annotation != null ? annotation.sourceStart : location.sourceStart; int end = annotation != null ? annotation.sourceEnd : location.sourceStart; String[] args = NoArgument; String[] shortArgs = NoArgument; if (outer != null) { args = new String[] { new String(outer.readableName()) }; shortArgs = new String[] { new String(outer.shortReadableName()) }; } int problemId = IProblem.RedundantNullDefaultAnnotation; if (outer instanceof PackageBinding) { problemId = IProblem.RedundantNullDefaultAnnotationPackage; } else if (outer instanceof ReferenceBinding) { problemId = IProblem.RedundantNullDefaultAnnotationType; } else if (outer instanceof MethodBinding) { problemId = IProblem.RedundantNullDefaultAnnotationMethod; } this.handle(problemId, args, shortArgs, start, end); }
public void nullDefaultAnnotationIsRedundant(ASTNode location, Annotation[] annotations, Binding outer) { Annotation annotation = findAnnotation(annotations, TypeIds.BitNonNullByDefaultAnnotation); int start = annotation != null ? annotation.sourceStart : location.sourceStart; int end = annotation != null ? annotation.sourceEnd : location.sourceStart; String[] args = NoArgument; String[] shortArgs = NoArgument; if (outer != null) { args = new String[] { new String(outer.readableName()) }; shortArgs = new String[] { new String(outer.shortReadableName()) }; } int problemId = IProblem.RedundantNullDefaultAnnotation; if (outer instanceof PackageBinding) { problemId = IProblem.RedundantNullDefaultAnnotationPackage; } else if (outer instanceof ReferenceBinding) { problemId = IProblem.RedundantNullDefaultAnnotationType; } else if (outer instanceof MethodBinding) { problemId = IProblem.RedundantNullDefaultAnnotationMethod; } this.handle(problemId, args, shortArgs, start, end); }
public void nullDefaultAnnotationIsRedundant(ASTNode location, Annotation[] annotations, Binding outer) { Annotation annotation = findAnnotation(annotations, TypeIds.BitNonNullByDefaultAnnotation); int start = annotation != null ? annotation.sourceStart : location.sourceStart; int end = annotation != null ? annotation.sourceEnd : location.sourceStart; String[] args = NoArgument; String[] shortArgs = NoArgument; if (outer != null) { args = new String[] { new String(outer.readableName()) }; shortArgs = new String[] { new String(outer.shortReadableName()) }; } int problemId = IProblem.RedundantNullDefaultAnnotation; if (outer instanceof PackageBinding) { problemId = IProblem.RedundantNullDefaultAnnotationPackage; } else if (outer instanceof ReferenceBinding) { problemId = IProblem.RedundantNullDefaultAnnotationType; } else if (outer instanceof MethodBinding) { problemId = IProblem.RedundantNullDefaultAnnotationMethod; } this.handle(problemId, args, shortArgs, start, end); }
public void nullDefaultAnnotationIsRedundant(ASTNode location, Annotation[] annotations, Binding outer) { Annotation annotation = findAnnotation(annotations, TypeIds.T_ConfiguredAnnotationNonNullByDefault); int start = annotation != null ? annotation.sourceStart : location.sourceStart; int end = annotation != null ? annotation.sourceEnd : location.sourceStart; String[] args = NoArgument; String[] shortArgs = NoArgument; if (outer != null) { args = new String[] { new String(outer.readableName()) }; shortArgs = new String[] { new String(outer.shortReadableName()) }; } int problemId = IProblem.RedundantNullDefaultAnnotation; if (outer instanceof PackageBinding) { problemId = IProblem.RedundantNullDefaultAnnotationPackage; } else if (outer instanceof ReferenceBinding) { problemId = IProblem.RedundantNullDefaultAnnotationType; } else if (outer instanceof MethodBinding) { problemId = IProblem.RedundantNullDefaultAnnotationMethod; } this.handle(problemId, args, shortArgs, start, end); }
public void nullDefaultAnnotationIsRedundant(ASTNode location, Annotation[] annotations, Binding outer) { Annotation annotation = findAnnotation(annotations, TypeIds.T_ConfiguredAnnotationNonNullByDefault); int start = annotation != null ? annotation.sourceStart : location.sourceStart; int end = annotation != null ? annotation.sourceEnd : location.sourceStart; String[] args = NoArgument; String[] shortArgs = NoArgument; if (outer != null) { args = new String[] { new String(outer.readableName()) }; shortArgs = new String[] { new String(outer.shortReadableName()) }; } int problemId = IProblem.RedundantNullDefaultAnnotation; if (outer instanceof PackageBinding) { problemId = IProblem.RedundantNullDefaultAnnotationPackage; } else if (outer instanceof ReferenceBinding) { problemId = IProblem.RedundantNullDefaultAnnotationType; } else if (outer instanceof MethodBinding) { problemId = IProblem.RedundantNullDefaultAnnotationMethod; } this.handle(problemId, args, shortArgs, start, end); }
public void cannotRedefineTypeArgumentNullity(TypeBinding typeVariable, Binding superElement, ASTNode location) { String[] arguments = new String[2]; String[] shortArguments = new String[2]; arguments[0] = String.valueOf(typeVariable.nullAnnotatedReadableName(this.options, false)); shortArguments[0] = String.valueOf(typeVariable.nullAnnotatedReadableName(this.options, true)); if (superElement instanceof MethodBinding) { ReferenceBinding declaringClass = ((MethodBinding) superElement).declaringClass; arguments[1] = String.valueOf(CharOperation.concat(declaringClass.readableName(), superElement.shortReadableName(), '.')); shortArguments[1] = String.valueOf(CharOperation.concat(declaringClass.shortReadableName(), superElement.shortReadableName(), '.')); } else { arguments[1] = String.valueOf(superElement.readableName()); shortArguments[1] = String.valueOf(superElement.shortReadableName()); } this.handle( IProblem.IllegalRedefinitionOfTypeVariable, arguments, shortArguments, location.sourceStart, location.sourceEnd); }
public void cannotRedefineTypeArgumentNullity(TypeBinding typeVariable, Binding superElement, ASTNode location) { String[] arguments = new String[2]; String[] shortArguments = new String[2]; arguments[0] = String.valueOf(typeVariable.nullAnnotatedReadableName(this.options, false)); shortArguments[0] = String.valueOf(typeVariable.nullAnnotatedReadableName(this.options, true)); if (superElement instanceof MethodBinding) { ReferenceBinding declaringClass = ((MethodBinding) superElement).declaringClass; arguments[1] = String.valueOf(CharOperation.concat(declaringClass.readableName(), superElement.shortReadableName(), '.')); shortArguments[1] = String.valueOf(CharOperation.concat(declaringClass.shortReadableName(), superElement.shortReadableName(), '.')); } else { arguments[1] = String.valueOf(superElement.readableName()); shortArguments[1] = String.valueOf(superElement.shortReadableName()); } this.handle( IProblem.IllegalRedefinitionOfTypeVariable, arguments, shortArguments, location.sourceStart, location.sourceEnd); }
public void nullDefaultAnnotationIsRedundant(ASTNode location, Annotation[] annotations, Binding outer) { Annotation annotation = findAnnotation(annotations, TypeIds.T_ConfiguredAnnotationNonNullByDefault); int start = annotation != null ? annotation.sourceStart : location.sourceStart; int end = annotation != null ? annotation.sourceEnd : location.sourceStart; String[] args = NoArgument; String[] shortArgs = NoArgument; if (outer != null) { args = new String[] { new String(outer.readableName()) }; shortArgs = new String[] { new String(outer.shortReadableName()) }; } int problemId = IProblem.RedundantNullDefaultAnnotation; if (outer instanceof PackageBinding) { problemId = IProblem.RedundantNullDefaultAnnotationPackage; } else if (outer instanceof ReferenceBinding) { problemId = IProblem.RedundantNullDefaultAnnotationType; } else if (outer instanceof MethodBinding) { problemId = IProblem.RedundantNullDefaultAnnotationMethod; } this.handle(problemId, args, shortArgs, start, end); }
public void nullDefaultAnnotationIsRedundant(ASTNode location, Annotation[] annotations, Binding outer) { Annotation annotation = findAnnotation(annotations, TypeIds.T_ConfiguredAnnotationNonNullByDefault); int start = annotation != null ? annotation.sourceStart : location.sourceStart; int end = annotation != null ? annotation.sourceEnd : location.sourceStart; String[] args = NoArgument; String[] shortArgs = NoArgument; if (outer != null) { args = new String[] { new String(outer.readableName()) }; shortArgs = new String[] { new String(outer.shortReadableName()) }; } int problemId = IProblem.RedundantNullDefaultAnnotation; if (outer instanceof PackageBinding) { problemId = IProblem.RedundantNullDefaultAnnotationPackage; } else if (outer instanceof ReferenceBinding) { problemId = IProblem.RedundantNullDefaultAnnotationType; } else if (outer instanceof MethodBinding) { problemId = IProblem.RedundantNullDefaultAnnotationMethod; } this.handle(problemId, args, shortArgs, start, end); }
public void nullDefaultAnnotationIsRedundant(ASTNode location, Annotation[] annotations, Binding outer) { if (outer == Scope.NOT_REDUNDANT) return; Annotation annotation = findAnnotation(annotations, TypeIds.BitNonNullByDefaultAnnotation); int start = annotation != null ? annotation.sourceStart : location.sourceStart; int end = annotation != null ? annotation.sourceEnd : location.sourceStart; String[] args = NoArgument; String[] shortArgs = NoArgument; if (outer != null) { args = new String[] { new String(outer.readableName()) }; shortArgs = new String[] { new String(outer.shortReadableName()) }; } int problemId = IProblem.RedundantNullDefaultAnnotation; if (outer instanceof PackageBinding) { problemId = IProblem.RedundantNullDefaultAnnotationPackage; } else if (outer instanceof ReferenceBinding) { problemId = IProblem.RedundantNullDefaultAnnotationType; } else if (outer instanceof MethodBinding) { problemId = IProblem.RedundantNullDefaultAnnotationMethod; } else if (outer instanceof LocalVariableBinding) { problemId = IProblem.RedundantNullDefaultAnnotationLocal; } else if (outer instanceof FieldBinding) { problemId = IProblem.RedundantNullDefaultAnnotationField; } this.handle(problemId, args, shortArgs, start, end); }
public void unhandledExceptionFromAutoClose (TypeBinding exceptionType, ASTNode location) { Binding binding = null; if (location instanceof LocalDeclaration) { binding = ((LocalDeclaration)location).binding; } else if (location instanceof NameReference) { binding = ((NameReference) location).binding; } else if (location instanceof FieldReference) { binding = ((FieldReference) location).binding; } if (binding != null) { this.handle( IProblem.UnhandledExceptionOnAutoClose, new String[] { new String(exceptionType.readableName()), new String(binding.readableName())}, new String[] { new String(exceptionType.shortReadableName()), new String(binding.shortReadableName())}, location.sourceStart, location.sourceEnd); } } public void unhandledWarningToken(Expression token) {