public class ArrayJavaType extends JavaType implements Type.ArrayType
Type.ArrayType, Type.Primitives| Constructor and Description |
|---|
ArrayJavaType(JavaType elementType,
JavaSymbol.TypeJavaSymbol arrayClass) |
| Modifier and Type | Method and Description |
|---|---|
JavaType |
elementType()
Type of elements in this array.
|
boolean |
equals(Object obj) |
JavaType |
erasure()
JLS8 4.6
|
int |
hashCode() |
boolean |
is(String fullyQualifiedName)
Check whether a type is the one designed by the fully qualified name.
|
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.
|
String |
toString() |
directSuperTypes, fullyQualifiedName, getSuperType, getSymbol, isArray, isClass, isNumerical, isParameterized, isPrimitive, isPrimitive, isPrimitiveWrapper, isTagged, isUnknown, isVoid, name, primitiveType, primitiveWrapperType, symbolclone, finalize, getClass, notify, notifyAll, wait, wait, waitfullyQualifiedName, isArray, isClass, isNumerical, isPrimitive, isPrimitive, isUnknown, isVoid, name, symbolpublic ArrayJavaType(JavaType elementType, JavaSymbol.TypeJavaSymbol arrayClass)
arrayClass - Symbols.arrayClasspublic boolean is(String fullyQualifiedName)
Type
Type type;
type.is("int");
type.is("int[]");
type.is("java.lang.String[]");
type.is("java.lang.Object");
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 JavaType elementType()
Type.ArrayTypeelementType in interface Type.ArrayTypeCopyright © 2012–2018 SonarSource. All rights reserved.