本文整理汇总了Java中org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.isRawType方法的典型用法代码示例。如果您正苦于以下问题:Java ReferenceBinding.isRawType方法的具体用法?Java ReferenceBinding.isRawType怎么用?Java ReferenceBinding.isRawType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding
的用法示例。
在下文中一共展示了ReferenceBinding.isRawType方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isFromSource
import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding; //导入方法依赖的package包/类
public boolean isFromSource() {
if (isClass() || isInterface() || isEnum()) {
ReferenceBinding referenceBinding = (ReferenceBinding) this.binding;
if (referenceBinding.isRawType()) {
return !((RawTypeBinding) referenceBinding).genericType().isBinaryBinding();
} else if (referenceBinding.isParameterizedType()) {
ParameterizedTypeBinding parameterizedTypeBinding = (ParameterizedTypeBinding) referenceBinding;
org.eclipse.jdt.internal.compiler.lookup.TypeBinding erasure = parameterizedTypeBinding.erasure();
if (erasure instanceof ReferenceBinding) {
return !((ReferenceBinding) erasure).isBinaryBinding();
}
return false;
} else {
return !referenceBinding.isBinaryBinding();
}
} else if (isTypeVariable()) {
final TypeVariableBinding typeVariableBinding = (TypeVariableBinding) this.binding;
final Binding declaringElement = typeVariableBinding.declaringElement;
if (declaringElement instanceof MethodBinding) {
MethodBinding methodBinding = (MethodBinding) declaringElement;
return !methodBinding.declaringClass.isBinaryBinding();
} else {
final org.eclipse.jdt.internal.compiler.lookup.TypeBinding typeBinding = (org.eclipse.jdt.internal.compiler.lookup.TypeBinding) declaringElement;
if (typeBinding instanceof ReferenceBinding) {
return !((ReferenceBinding) typeBinding).isBinaryBinding();
} else if (typeBinding instanceof ArrayBinding) {
final ArrayBinding arrayBinding = (ArrayBinding) typeBinding;
final org.eclipse.jdt.internal.compiler.lookup.TypeBinding leafComponentType = arrayBinding.leafComponentType;
if (leafComponentType instanceof ReferenceBinding) {
return !((ReferenceBinding) leafComponentType).isBinaryBinding();
}
}
}
} else if (isCapture()) {
CaptureBinding captureBinding = (CaptureBinding) this.binding;
return !captureBinding.sourceType.isBinaryBinding();
}
return false;
}
示例2: isDefaultConstructor
import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding; //导入方法依赖的package包/类
/**
* @see IMethodBinding#isDefaultConstructor()
* @since 3.0
*/
public boolean isDefaultConstructor() {
final ReferenceBinding declaringClassBinding = this.binding.declaringClass;
if (declaringClassBinding.isRawType()) {
RawTypeBinding rawTypeBinding = (RawTypeBinding) declaringClassBinding;
if (rawTypeBinding.genericType().isBinaryBinding()) {
return false;
}
return (this.binding.modifiers & ExtraCompilerModifiers.AccIsDefaultConstructor) != 0;
}
if (declaringClassBinding.isBinaryBinding()) {
return false;
}
return (this.binding.modifiers & ExtraCompilerModifiers.AccIsDefaultConstructor) != 0;
}