本文整理了Java中org.eclipse.jdt.internal.compiler.lookup.Binding.isValidBinding()
方法的一些代码示例,展示了Binding.isValidBinding()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Binding.isValidBinding()
方法的具体详情如下:
包路径:org.eclipse.jdt.internal.compiler.lookup.Binding
类名称:Binding
方法名:isValidBinding
暂无
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
public static boolean isValid(/*@Nullable*/Binding binding) {
return binding != null && binding.isValidBinding();
}
public boolean isVolatile() {
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
public static boolean isValid(/*@Nullable*/Binding binding) {
return binding != null && binding.isValidBinding();
}
public boolean isVolatile() {
代码示例来源:origin: INRIA/spoon
if (someBinding != null && someBinding.isValidBinding() && someBinding instanceof PackageBinding) {
packageBinding = (PackageBinding) someBinding;
} else {
代码示例来源:origin: org.eclipse.jetty.orbit/org.eclipse.jdt.core
private void internalResolve(Scope scope, boolean staticContext) {
// detect variable/type name collisions
if (this.binding != null) {
Binding existingType = scope.parent.getBinding(this.name, Binding.TYPE, this, false/*do not resolve hidden field*/);
if (existingType != null
&& this.binding != existingType
&& existingType.isValidBinding()
&& (existingType.kind() != Binding.TYPE_PARAMETER || !staticContext)) {
scope.problemReporter().typeHiding(this, existingType);
}
}
}
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core
private void internalResolve(Scope scope, boolean staticContext) {
// detect variable/type name collisions
if (this.binding != null) {
Binding existingType = scope.parent.getBinding(this.name, Binding.TYPE, this, false/*do not resolve hidden field*/);
if (existingType != null
&& this.binding != existingType
&& existingType.isValidBinding()
&& (existingType.kind() != Binding.TYPE_PARAMETER || !staticContext)) {
scope.problemReporter().typeHiding(this, existingType);
}
}
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
private void internalResolve(Scope scope, boolean staticContext) {
// detect variable/type name collisions
if (this.binding != null) {
Binding existingType = scope.parent.getBinding(this.name, Binding.TYPE, this, false/*do not resolve hidden field*/);
if (existingType != null
&& this.binding != existingType
&& existingType.isValidBinding()
&& (existingType.kind() != Binding.TYPE_PARAMETER || !staticContext)) {
scope.problemReporter().typeHiding(this, existingType);
}
}
}
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core
public TypeBinding resolveType(BlockScope scope) {
if(this.type instanceof QualifiedTypeReference) {
QualifiedTypeReference qualifiedTypeReference = (QualifiedTypeReference) this.type;
Binding binding = scope.parent.getTypeOrPackage(qualifiedTypeReference.tokens); // step up from the ClassScope
if (!binding.isValidBinding()) {
scope.problemReporter().invalidType(this, (TypeBinding) binding);
throw new CompletionNodeFound();
}
throw new CompletionNodeFound(this, binding, scope);
}
throw new CompletionNodeFound(this, null, scope);
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
public TypeBinding resolveType(BlockScope scope) {
if(this.type instanceof QualifiedTypeReference) {
QualifiedTypeReference qualifiedTypeReference = (QualifiedTypeReference) this.type;
Binding binding = scope.parent.getTypeOrPackage(qualifiedTypeReference.tokens); // step up from the ClassScope
if (!binding.isValidBinding()) {
scope.problemReporter().invalidType(this, (TypeBinding) binding);
throw new CompletionNodeFound();
}
throw new CompletionNodeFound(this, binding, scope);
}
throw new CompletionNodeFound(this, null, scope);
}
}
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
public TypeBinding resolveType(BlockScope scope) {
if(this.type instanceof QualifiedTypeReference) {
QualifiedTypeReference qualifiedTypeReference = (QualifiedTypeReference) this.type;
Binding binding = scope.parent.getTypeOrPackage(qualifiedTypeReference.tokens); // step up from the ClassScope
if (!binding.isValidBinding()) {
scope.problemReporter().invalidType(this, (TypeBinding) binding);
throw new CompletionNodeFound();
}
throw new CompletionNodeFound(this, binding, scope);
}
throw new CompletionNodeFound(this, null, scope);
}
}
代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion
public TypeBinding resolveType(BlockScope scope) {
if(this.type instanceof QualifiedTypeReference) {
QualifiedTypeReference qualifiedTypeReference = (QualifiedTypeReference) this.type;
Binding binding = scope.parent.getTypeOrPackage(qualifiedTypeReference.tokens); // step up from the ClassScope
if (!binding.isValidBinding()) {
scope.problemReporter().invalidType(this, (TypeBinding) binding);
throw new CompletionNodeFound();
}
throw new CompletionNodeFound(this, binding, scope);
}
throw new CompletionNodeFound(this, null, scope);
}
}
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
public TypeBinding resolveType(BlockScope scope) {
if(this.type instanceof QualifiedTypeReference) {
QualifiedTypeReference qualifiedTypeReference = (QualifiedTypeReference) this.type;
Binding binding = scope.parent.getTypeOrPackage(qualifiedTypeReference.tokens); // step up from the ClassScope
if (!binding.isValidBinding()) {
scope.problemReporter().invalidType(this, (TypeBinding) binding);
throw new CompletionNodeFound();
}
throw new CompletionNodeFound(this, binding, scope);
}
throw new CompletionNodeFound(this, null, scope);
}
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
@Override
public TypeBinding resolveType(BlockScope scope) {
if(this.type instanceof QualifiedTypeReference) {
QualifiedTypeReference qualifiedTypeReference = (QualifiedTypeReference) this.type;
Binding binding = scope.parent.getTypeOrPackage(qualifiedTypeReference.tokens); // step up from the ClassScope
if (!binding.isValidBinding()) {
scope.problemReporter().invalidType(this, (TypeBinding) binding);
throw new CompletionNodeFound();
}
throw new CompletionNodeFound(this, binding, scope);
}
throw new CompletionNodeFound(this, null, scope);
}
}
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
protected TypeBinding getTypeBinding(Scope scope) {
// it can be a package, type or member type
Binding binding = scope.parent.getTypeOrPackage(this.tokens); // step up from the ClassScope
if (!binding.isValidBinding()) {
scope.problemReporter().invalidType(this, (TypeBinding) binding);
if (binding.problemId() == ProblemReasons.NotFound) {
throw new CompletionNodeFound(this, binding, scope);
}
throw new CompletionNodeFound();
}
throw new CompletionNodeFound(this, binding, scope);
}
public boolean isClass(){
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
protected TypeBinding getTypeBinding(Scope scope) {
// it can be a package, type or member type
Binding binding = scope.parent.getTypeOrPackage(this.tokens); // step up from the ClassScope
if (!binding.isValidBinding()) {
scope.problemReporter().invalidType(this, (TypeBinding) binding);
if (binding.problemId() == ProblemReasons.NotFound) {
throw new CompletionNodeFound(this, binding, scope);
}
throw new CompletionNodeFound();
}
throw new CompletionNodeFound(this, binding, scope);
}
public boolean isClass(){
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
protected TypeBinding getTypeBinding(Scope scope) {
// it can be a package, type or member type
Binding binding = scope.parent.getTypeOrPackage(this.tokens); // step up from the ClassScope
if (!binding.isValidBinding()) {
scope.problemReporter().invalidType(this, (TypeBinding) binding);
if (binding.problemId() == ProblemReasons.NotFound) {
throw new CompletionNodeFound(this, binding, scope);
}
throw new CompletionNodeFound();
}
throw new CompletionNodeFound(this, binding, scope);
}
public boolean isClass(){
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core
protected TypeBinding getTypeBinding(Scope scope) {
// it can be a package, type or member type
Binding binding = scope.parent.getTypeOrPackage(this.tokens); // step up from the ClassScope
if (!binding.isValidBinding()) {
scope.problemReporter().invalidType(this, (TypeBinding) binding);
if (binding.problemId() == ProblemReasons.NotFound) {
throw new CompletionNodeFound(this, binding, scope);
}
throw new CompletionNodeFound();
}
throw new CompletionNodeFound(this, binding, scope);
}
public boolean isClass(){
代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion
protected TypeBinding getTypeBinding(Scope scope) {
// it can be a package, type or member type
Binding binding = scope.parent.getTypeOrPackage(this.tokens); // step up from the ClassScope
if (!binding.isValidBinding()) {
scope.problemReporter().invalidType(this, (TypeBinding) binding);
if (binding.problemId() == ProblemReasons.NotFound) {
throw new CompletionNodeFound(this, binding, scope);
}
throw new CompletionNodeFound();
}
throw new CompletionNodeFound(this, binding, scope);
}
public boolean isClass(){
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
@Override
protected TypeBinding getTypeBinding(Scope scope) {
// it can be a package, type or member type
Binding binding = scope.parent.getTypeOrPackage(this.tokens); // step up from the ClassScope
if (!binding.isValidBinding()) {
scope.problemReporter().invalidType(this, (TypeBinding) binding);
if (binding.problemId() == ProblemReasons.NotFound) {
throw new CompletionNodeFound(this, binding, scope);
}
throw new CompletionNodeFound();
}
throw new CompletionNodeFound(this, binding, scope);
}
public boolean isClass(){
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
private void internalResolve(Scope scope, boolean staticContext) {
// detect variable/type name collisions
if (this.binding != null) {
Binding existingType = scope.parent.getBinding(this.name, Binding.TYPE, this, false/*do not resolve hidden field*/);
if (existingType != null
&& this.binding != existingType
&& existingType.isValidBinding()
&& (existingType.kind() != Binding.TYPE_PARAMETER || !staticContext)) {
scope.problemReporter().typeHiding(this, existingType);
}
}
if (this.annotations != null || scope.environment().usesNullTypeAnnotations()) {
resolveAnnotations(scope);
}
}
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
protected TypeBinding getTypeBinding(Scope scope) {
// it can be a package, type or member type
Binding binding = scope.getTypeOrPackage(new char[][] {this.token});
if (!binding.isValidBinding()) {
if (binding instanceof TypeBinding) {
scope.problemReporter().invalidType(this, (TypeBinding) binding);
} else if (binding instanceof PackageBinding) {
ProblemReferenceBinding problemBinding = new ProblemReferenceBinding(((PackageBinding)binding).compoundName, null, binding.problemId());
scope.problemReporter().invalidType(this, problemBinding);
}
throw new SelectionNodeFound();
}
throw new SelectionNodeFound(binding);
}
public StringBuffer printExpression(int indent, StringBuffer output) {
内容来源于网络,如有侵权,请联系作者删除!