Package com.thoughtworks.qdox.model
Class Type
java.lang.Object
com.thoughtworks.qdox.model.Type
- All Implemented Interfaces:
Serializable,Comparable
- Direct Known Subclasses:
TypeVariable,WildcardType
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionType(String fullName, int dimensions, JavaClassParent context) Type(String fullName, TypeDef typeDef, int dimensions, JavaClassParent context) Type(String fullName, String name, int dimensions, JavaClassParent context) -
Method Summary
Modifier and TypeMethodDescriptionintstatic TypecreateUnresolved(TypeDef typeDef, int dimensions, JavaClassParent context) static TypecreateUnresolved(TypeDef typeDef, JavaClassParent context) static TypecreateUnresolved(String name, int dimensions, JavaClassParent context) booleanType[]intReturns the depth of this array, 0 if it's not an arrayDeprecated.instead use 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 translatedThe FQN representation of an Object for code usage This implementation ignores generics Some examples how Objects will be translatedprotected StringgetGenericValue(TypeVariable[] typeVariableList) protected StringgetResolvedGenericValue(TypeVariable[] typeParameters) protected StringgetResolvedValue(TypeVariable[] typeParameters) protected intgetTypeVariableIndex(JavaClass superClass) getValue()The FQN representation of an Object for code usage This implementation ignores generics Some examples how Objects will be translatedinthashCode()booleanbooleanisArray()Returns true if this Type is an arraybooleanbooleanChecks if the FQN of this Type is resolvedbooleanisVoid()protected Typeprotected TypeReturns getGenericValue() extended with the array informationtoString()Returns getValue() extended with the array information
-
Field Details
-
EMPTY_ARRAY
-
VOID
-
-
Constructor Details
-
Type
-
Type
-
Type
-
Type
-
Type
-
-
Method Details
-
createUnresolved
-
createUnresolved
-
createUnresolved
-
getJavaClassParent
-
getFullQualifiedName
Deprecated.instead use getFullyQualifiedName() -
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 translatedObject > java.lang.Object java.util.List > java.util.List ? > ? T > T anypackage.Outer.Inner > anypackage.Outer$Inner
- Returns:
-
getValue
The FQN representation of an Object for code usage This implementation ignores generics Some examples how Objects will be translatedObject > java.lang.object java.util.List
> java.util.List ? > ? T > T anypackage.Outer.Inner > anypackage.Outer.Inner - Returns:
- type representation for code usage
-
getGenericValue
The FQN representation of an Object for code usage This implementation ignores generics Some examples how Objects will be translatedObject > java.lang.object java.util.List
> java.util.List ? > ? T > T anypackage.Outer.Inner > anypackage.Outer.Inner - Returns:
- generic type representation for code usage
- Since:
- 1.8
-
getGenericValue
-
getResolvedValue
-
getResolvedGenericValue
-
isResolved
public boolean isResolved()Checks if the FQN of this Type is resolved- Returns:
-
compareTo
- Specified by:
compareToin interfaceComparable- See Also:
-
isArray
public boolean isArray()Returns true if this Type is an array- Returns:
-
getDimensions
public int getDimensions()Returns the depth of this array, 0 if it's not an array- Returns:
- The depth of this array
-
getActualTypeArguments
- Returns:
- the actualTypeArguments or null
-
toString
Returns getValue() extended with the array information -
toGenericString
Returns getGenericValue() extended with the array informationObject > java.lang.Object Object[] > java.lang.Object[] List
- Returns:
-
equals
-
hashCode
public int hashCode() -
getJavaClass
-
isA
- Since:
- 1.3
-
isPrimitive
public boolean isPrimitive()- Since:
- 1.6
-
isVoid
public boolean isVoid()- Since:
- 1.6
-
getTypeVariableIndex
- Parameters:
superClass-- Returns:
- Since:
- 1.12
-
resolve
- Parameters:
parentClass-- Returns:
- Since:
- 1.12
-
resolve
- Parameters:
parentClass-subclass-- Returns:
- Since:
- 1.12
-