| Modifier and Type | Class and Description |
|---|---|
static class |
JavaType.WildCardType.BoundType |
JavaType.ArrayJavaType, JavaType.ClassJavaType, JavaType.MethodJavaType, JavaType.ParametrizedTypeJavaType, JavaType.TypeVariableJavaType, JavaType.UnknownType, JavaType.WildCardTypeType.ArrayType, Type.Primitives| Constructor and Description |
|---|
JavaType.WildCardType(JavaType bound,
JavaType.WildCardType.BoundType boundType) |
| Modifier and Type | Method and 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 |
isSubtypeOfBound(JavaType type) |
erasure, fullyQualifiedName, getSymbol, is, isArray, isClass, isNumerical, isPrimitive, isPrimitive, isPrimitiveWrapper, isTagged, isUnknown, isVoid, name, primitiveType, primitiveWrapperType, symbol, toStringpublic JavaType.WildCardType(JavaType bound, JavaType.WildCardType.BoundType boundType)
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 JavaTypefullyQualifiedName - 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 JavaTypesuperType - instance of a potential superType.public boolean isSubtypeOfBound(JavaType type)
Copyright © 2012–2016 SonarSource. All rights reserved.