本文整理了Java中org.eclipse.jdt.internal.compiler.lookup.Binding.shortReadableName()
方法的一些代码示例,展示了Binding.shortReadableName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Binding.shortReadableName()
方法的具体详情如下:
包路径:org.eclipse.jdt.internal.compiler.lookup.Binding
类名称:Binding
方法名:shortReadableName
暂无
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
@Override
public Name getSimpleName() {
return new NameImpl(_binding.shortReadableName());
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.compiler.apt
@Override
public Name getSimpleName() {
return new NameImpl(_binding.shortReadableName());
}
代码示例来源:origin: org.eclipse.jdt.compiler/apt
@Override
public Name getSimpleName() {
return new NameImpl(_binding.shortReadableName());
}
代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj
@Override
public Name getSimpleName() {
return new NameImpl(_binding.shortReadableName());
}
代码示例来源:origin: org.eclipse.jetty.orbit/org.eclipse.jdt.core
@Override
public Name getSimpleName() {
return new NameImpl(_binding.shortReadableName());
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/ecj
@Override
public Name getSimpleName() {
return new NameImpl(_binding.shortReadableName());
}
代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj
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);
}
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
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);
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
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);
}
代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj
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);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/ecj
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);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
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);
}
代码示例来源:origin: org.eclipse.jetty.orbit/org.eclipse.jdt.core
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);
}
代码示例来源:origin: com.vaadin/vaadin-client-compiler-deps
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);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
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);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/ecj
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);
}
代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion
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);
}
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
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);
}
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
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);
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
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) {
内容来源于网络,如有侵权,请联系作者删除!