com.sun.jersey.api.client
Class GenericType<T>

java.lang.Object
  extended by com.sun.jersey.api.client.GenericType<T>
Type Parameters:
T - the generic type parameter.

public class GenericType<T>
extends java.lang.Object

Represents a generic type T.


Constructor Summary
protected GenericType()
          Constructs a new generic type, deriving the generic type and class from type parameter.
  GenericType(java.lang.reflect.Type genericType)
          Constructs a new generic type, supplying the generic type information and derving the class.
 
Method Summary
 java.lang.Class<T> getRawClass()
          Gets underlying raw class instance derived from the type.
 java.lang.reflect.Type getType()
          Gets underlying Type instance derived from the type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericType

protected GenericType()
Constructs a new generic type, deriving the generic type and class from type parameter. Note that this constructor is protected, users should create a (usually anonymous) subclass as shown above.


GenericType

public GenericType(java.lang.reflect.Type genericType)
Constructs a new generic type, supplying the generic type information and derving the class.

Parameters:
genericType - the generic type.
Throws:
java.lang.IllegalArgumentException - if genericType is null or is neither an instance of Class or ParameterizedType whose raw type is not an instance of Class.
Method Detail

getType

public final java.lang.reflect.Type getType()
Gets underlying Type instance derived from the type.

Returns:
the type.

getRawClass

public final java.lang.Class<T> getRawClass()
Gets underlying raw class instance derived from the type.

Returns:
the class.


Copyright © 2013 Oracle Corporation. All Rights Reserved.