public class Type
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static Type[] |
EMPTY_ARRAY |
static Type |
VOID |
Constructor and Description |
---|
Type(java.lang.String fullName) |
Type(java.lang.String fullName,
int dimensions) |
Type(java.lang.String fullName,
int dimensions,
JavaClassParent context) |
Type(java.lang.String fullName,
java.lang.String name,
int dimensions,
JavaClassParent context) |
Type(java.lang.String fullName,
TypeDef typeDef,
int dimensions,
JavaClassParent context) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.lang.Object o) |
static Type |
createUnresolved(java.lang.String name,
int dimensions,
JavaClassParent context) |
static Type |
createUnresolved(TypeDef typeDef,
int dimensions,
JavaClassParent context) |
static Type |
createUnresolved(TypeDef typeDef,
JavaClassParent context) |
boolean |
equals(java.lang.Object obj) |
Type[] |
getActualTypeArguments() |
int |
getDimensions()
Returns the depth of this array, 0 if it's not an array
|
java.lang.String |
getFullQualifiedName()
Deprecated.
instead use getFullyQualifiedName()
|
java.lang.String |
getFullyQualifiedName()
Returns the FQN of an Object or the handler of a Type
If the name of the can't be resolved based on the imports and the classes on the classpath the name will be returned
InnerClasses will use the $ sign
Some examples how names will be translated
|
java.lang.String |
getGenericValue()
The FQN representation of an Object for code usage
This implementation ignores generics
Some examples how Objects will be translated
|
protected java.lang.String |
getGenericValue(TypeVariable[] typeVariableList) |
JavaClass |
getJavaClass() |
JavaClassParent |
getJavaClassParent() |
protected java.lang.String |
getResolvedGenericValue(TypeVariable[] typeParameters) |
protected java.lang.String |
getResolvedValue(TypeVariable[] typeParameters) |
protected int |
getTypeVariableIndex(JavaClass superClass) |
java.lang.String |
getValue()
The FQN representation of an Object for code usage
This implementation ignores generics
Some examples how Objects will be translated
|
int |
hashCode() |
boolean |
isA(Type type) |
boolean |
isArray()
Returns true if this Type is an array
|
boolean |
isPrimitive() |
boolean |
isResolved()
Checks if the FQN of this Type is resolved
|
boolean |
isVoid() |
protected Type |
resolve(JavaClass parentClass) |
protected Type |
resolve(JavaClass parentClass,
JavaClass subclass) |
java.lang.String |
toGenericString()
Returns getGenericValue() extended with the array information
|
java.lang.String |
toString()
Returns getValue() extended with the array information
|
public Type(java.lang.String fullName, java.lang.String name, int dimensions, JavaClassParent context)
public Type(java.lang.String fullName, TypeDef typeDef, int dimensions, JavaClassParent context)
public Type(java.lang.String fullName, int dimensions, JavaClassParent context)
public Type(java.lang.String fullName, int dimensions)
public Type(java.lang.String fullName)
public static Type createUnresolved(java.lang.String name, int dimensions, JavaClassParent context)
public static Type createUnresolved(TypeDef typeDef, int dimensions, JavaClassParent context)
public static Type createUnresolved(TypeDef typeDef, JavaClassParent context)
public JavaClassParent getJavaClassParent()
public java.lang.String getFullQualifiedName()
public java.lang.String getFullyQualifiedName()
Object > java.lang.Object java.util.List > java.util.List ? > ? T > T anypackage.Outer.Inner > anypackage.Outer$Inner
public java.lang.String getValue()
Object > java.lang.object java.util.List> java.util.List ? > ? T > T anypackage.Outer.Inner > anypackage.Outer.Inner
public java.lang.String getGenericValue()
Object > java.lang.object java.util.List> java.util.List ? > ? T > T anypackage.Outer.Inner > anypackage.Outer.Inner
protected java.lang.String getGenericValue(TypeVariable[] typeVariableList)
protected java.lang.String getResolvedValue(TypeVariable[] typeParameters)
protected java.lang.String getResolvedGenericValue(TypeVariable[] typeParameters)
public boolean isResolved()
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
Comparable.compareTo(Object)
public boolean isArray()
public int getDimensions()
public Type[] getActualTypeArguments()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toGenericString()
Object > java.lang.Object Object[] > java.lang.Object[] List
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public JavaClass getJavaClass()
public boolean isA(Type type)
public boolean isPrimitive()
public boolean isVoid()
protected int getTypeVariableIndex(JavaClass superClass)
superClass
- protected Type resolve(JavaClass parentClass)
parentClass
- Copyright © 2002–2018. All rights reserved.