|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Objectorg.javaruntype.typedef.TypeDef
public final class TypeDef
This class represents a Type Definition. A Type Definition specifies which type parameters (if any) can a class take, and the relation that exists among them. It corresponds to the way a class can be defined in its .java file.
Examples of type definitions are:
These type definitions serve as a template for creating types (Type class), which
resolve all type variables present in the type definition (for example, for a TypeDef
object java.util.Collection<E> we can get a Type object
java.util.Collection<java.lang.String>
Objects of this class are never created directly. To obtain a TypeDef object,
the diverse methods in the TypeDefs class should be used.
Objects of this class are immutable, and thus thread-safe. Also, in order to avoid excessive memory usage, an internal synchronized cache exists which prevents the same TypeDef from being instantiated more than once (so, if two TypeDef objects are equal, this will mean that they are the same object).
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
Class<?> |
getComponentClass()
Returns the component class of the type definition. |
String |
getName()
Returns the name of the type definition. |
TypeDefVariable[] |
getVariables()
Returns the variables of the type definition. |
int |
hashCode()
|
String |
toString()
|
| Methods inherited from class Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public Class<?> getComponentClass()
public TypeDefVariable[] getVariables()
public String getName()
public String toString()
toString in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||