public class TypeM
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
|
TypeM(java.lang.Class<?> aClass) |
protected |
TypeM(java.lang.String name) |
|
TypeM(java.lang.String packageName,
java.lang.String simpleName) |
| Modifier and Type | Method and Description |
|---|---|
ImportTypesM |
addToImportTypes(ImportTypesM result) |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getGenericType()
Returns a String representation of the minimal generics definition of this type.
|
java.lang.String |
getGenericTypeDefinition()
Returns a String representation of the complete generics definition of this type.
|
java.lang.String |
getName() |
java.lang.String |
getPackageName() |
java.lang.String |
getSimpleName() |
TypeListM |
getTypeParameters() |
int |
hashCode()
This
hashCode() implementation doesn't use typeParameters to avoid a potential
StackOverflowError. |
boolean |
isArrayType() |
boolean |
isGeneric() |
boolean |
isInPackage(java.lang.String packageName) |
boolean |
isPrimitive() |
boolean |
isTypeVariable() |
java.lang.String |
toString() |
TypeM |
withTypeParameter(TypeM... params) |
protected TypeM(java.lang.String name)
public TypeM(java.lang.String packageName,
java.lang.String simpleName)
public TypeM(java.lang.Class<?> aClass)
public TypeListM getTypeParameters()
public java.lang.String getSimpleName()
public java.lang.String getName()
public boolean isPrimitive()
public boolean isTypeVariable()
public boolean isArrayType()
public java.lang.String getPackageName()
public boolean isGeneric()
public java.lang.String getGenericTypeDefinition()
Named generic types are represented with bounds. To get a minimal representation used for field
declarations see getGenericType()
Example Output: "Map<T extends CharSequence, E extends List<? super Number>>"
public java.lang.String getGenericType()
Named generic types are represented without bounds, because they are defined in the class or
method signature. To get a representation of the full definition including bounds see
getGenericTypeDefinition()
Example Output: "Map<T, ? extends List<? super Number>>"
public ImportTypesM addToImportTypes(ImportTypesM result)
public boolean isInPackage(java.lang.String packageName)
public int hashCode()
hashCode() implementation doesn't use typeParameters to avoid a potential
StackOverflowError. The equals(Object) implementation does use that field.hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object