|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectma.glasnost.orika.metadata.Type<T>
T - public final class Type<T>
Type is an implementation of ParameterizedType which may be
used in various mapping methods where a Class instance would normally
be used, in order to provide more specific details as to the actual types
represented by the generic template parameters in a given class.
Such details are not normally available at runtime using a Class instance
due to type-erasure.
Type essentially provides a runtime token to represent a ParameterizedType
with fully-resolve actual type arguments; it will contain
| Method Summary | ||
|---|---|---|
int |
compareTo(Type<?> other)
|
|
boolean |
equals(Object obj)
|
|
Type<?> |
findAncestor(Class<?> ancestor)
Finds a class or interface which is an ancestor of this type |
|
Type<?> |
findAncestor(Type<?> ancestor)
Finds a class or interface which is an ancestor of this type |
|
Type<?> |
findInterface(Type<?> theInterface)
|
|
Type[] |
getActualTypeArguments()
|
|
String |
getCanonicalName()
|
|
Type<?> |
getComponentType()
|
|
Type<?>[] |
getInterfaces()
|
|
String |
getName()
|
|
|
getNestedType(int index)
Get the nested Type of the specified index. |
|
Type |
getOwnerType()
|
|
Type<?> |
getPrimitiveType()
|
|
Class<T> |
getRawType()
|
|
String |
getSimpleName()
|
|
Type<?> |
getSuperType()
|
|
Type |
getTypeByVariable(TypeVariable<?> typeVariable)
|
|
Map<String,Type<?>> |
getTypesByVariable()
|
|
Type<?> |
getWrapperType()
|
|
int |
hashCode()
|
|
boolean |
isArray()
|
|
boolean |
isAssignableFrom(Class<?> other)
Test whether this type is assignable from the other Class; returns true if this type is not parameterized and the raw type is assignable. |
|
boolean |
isAssignableFrom(Type<?> other)
Test whether this type is assignable from the other type. |
|
boolean |
isCollection()
|
|
boolean |
isConvertibleFromString()
|
|
boolean |
isEnum()
|
|
boolean |
isList()
|
|
boolean |
isMap()
|
|
boolean |
isMultiOccurrence()
|
|
boolean |
isParameterized()
|
|
boolean |
isPrimitive()
|
|
boolean |
isPrimitiveFor(Type<?> wrapper)
|
|
boolean |
isPrimitiveWrapper()
|
|
boolean |
isString()
|
|
boolean |
isWrapperFor(Type<?> primitive)
|
|
String |
toFullyQualifiedString()
|
|
String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public boolean isParameterized()
public <X> Type<X> getNestedType(int index)
index -
public Type<?> getSuperType()
public Type<?>[] getInterfaces()
public Type[] getActualTypeArguments()
getActualTypeArguments in interface ParameterizedTypepublic Map<String,Type<?>> getTypesByVariable()
public Type getTypeByVariable(TypeVariable<?> typeVariable)
public Class<T> getRawType()
getRawType in interface ParameterizedTypepublic Type<?> getComponentType()
public Type getOwnerType()
getOwnerType in interface ParameterizedTypepublic String getSimpleName()
public String getName()
public String getCanonicalName()
public boolean isAssignableFrom(Type<?> other)
other -
public boolean isAssignableFrom(Class<?> other)
other -
public boolean isEnum()
public boolean isArray()
public boolean isCollection()
public boolean isList()
public boolean isMap()
public boolean isMultiOccurrence()
public boolean isString()
public boolean isPrimitive()
public boolean isPrimitiveWrapper()
public boolean isWrapperFor(Type<?> primitive)
public boolean isPrimitiveFor(Type<?> wrapper)
public Type<?> getWrapperType()
public Type<?> findAncestor(Type<?> ancestor)
ancestor -
public Type<?> findAncestor(Class<?> ancestor)
ancestor -
public Type<?> findInterface(Type<?> theInterface)
public Type<?> getPrimitiveType()
public boolean isConvertibleFromString()
public String toString()
toString in class Objectpublic String toFullyQualifiedString()
public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic int compareTo(Type<?> other)
compareTo in interface Comparable<Type<?>>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||