|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.ws.rs.core.GenericType<T>
T
- the generic type parameter.public abstract class GenericType<T>
Supports in-line instantiation of objects that represent parameterized
types with actual type parameters.
An object that represents any parameterized type may be obtained by
sub-classing GenericType
.
GenericType<List<String>> stringListType = new GenericType<List<String>>() {};
Constructor Summary | |
---|---|
protected |
GenericType()
Protected constructor for a generic type of a concrete Java type. |
Method Summary | ||
---|---|---|
boolean |
equals(Object obj)
|
|
Type[] |
getParameterTypes()
Retrieve an array of Type objects representing the actual type
arguments to the type represented by this generic type instance. |
|
Class<T> |
getRawType()
Returns the object representing the class or interface that declared the type represented by this generic type instance. |
|
Type |
getType()
Retrieve the type represented by the generic type instance. |
|
int |
hashCode()
|
|
static
|
of(Class<?> rawType,
Type type)
Construct a generic type instance with programmatically set values of type and raw type. |
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected GenericType()
Method Detail |
---|
public static <T> GenericType<T> of(Class<?> rawType, Type type)
T
- Java type.rawType
- raw parameter type.type
- parameter type (possibly generic).
public final Type getType()
public final Type[] getParameterTypes()
Type
objects representing the actual type
arguments to the type represented by this generic type instance.
Note that in some cases, the returned array may be empty. This can occur
if the type represented by this generic type is a non-parameterized type.
Type
objects representing the actual type
arguments to this type.
TypeNotPresentException
- if any of the actual type arguments
refers to a non-existent type declaration.
MalformedParameterizedTypeException
- if any of the
actual type parameters refer to a parameterized type that cannot
be instantiated for any reason.public final Class<T> getRawType()
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |