Typepublic class UnknownType extends ClassJavaType
Type.ArrayType, Type.Primitives| Constructor | Description |
|---|---|
UnknownType(JavaSymbol.TypeJavaSymbol symbol) |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
isSubtypeOf(String fullyQualifiedName) |
Check whether a type is a subtype of the one designed by the fully qualified name.
|
boolean |
isSubtypeOf(Type superType) |
Check whether a type is a subtype of another.
|
boolean |
isUnknown() |
Check if this type has been resolved.
|
String |
toString() |
directSuperTypes, getSuperType, is, substitutedType, superTypeserasure, fullyQualifiedName, getSymbol, isArray, isClass, isNumerical, isParameterized, isPrimitive, isPrimitive, isPrimitiveWrapper, isTagged, isVoid, name, primitiveType, primitiveWrapperType, symbolpublic UnknownType(JavaSymbol.TypeJavaSymbol symbol)
public boolean isSubtypeOf(String fullyQualifiedName)
Type
This method will consider implemented interfaces as well as superclasses.
Type type;
type.isSubtypeOf("Object[]");
type.isSubtypeOf("org.mypackage.MyClass");
type.isSubtypeOf("org.mypackage.MyInterface");
type.isSubtypeOf("java.lang.Object");
isSubtypeOf in interface TypeisSubtypeOf in class ClassJavaTypefullyQualifiedName - fully qualified name to check in the type hierarchy. Use "[]" for arrays.public boolean isSubtypeOf(Type superType)
Type
This method will consider implemented interfaces as well as superclasses.
Type type, myOtherType;
type.isSubtypeOf(myOtherType);
isSubtypeOf in interface TypeisSubtypeOf in class ClassJavaTypesuperType - instance of a potential superType.public boolean isUnknown()
TypeCopyright © 2012–2018 SonarSource. All rights reserved.