Class GenericType<T>
java.lang.Object
org.jboss.resteasy.util.GenericType<T>
Deprecated.
Replaced by javax.ws.rs.core.GenericType
This class is a trick used to extract GenericType information at runtime. Java does not allow you get generic
type information easily, so this class does the trick. For example:
N.B. This class is replaced by javax.ws.rs.core.GenericType.
Type genericType = (new GenericTypeinvalid input: '<'ListThe above code will get you the genericType for List>() {}).getGenericType();
- Version:
- $Revision: 1 $
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDeprecated.Constructs a new generic entity. -
Method Summary
-
Field Details
-
type
-
genericType
Deprecated.
-
-
Constructor Details
-
GenericType
protected GenericType()Deprecated.Constructs a new generic entity. Derives represented class from type parameter. Note that this constructor is protected, users should create a (usually anonymous) subclass as shown above.- Parameters:
entity- the entity instance, must not be null- Throws:
IllegalArgumentException- if entity is null
-
-
Method Details
-
getType
-
getGenericType
Deprecated.Gets underlyingTypeinstance. Note that this is derived from the type parameter, not the enclosed instance. I.e. in the example in the introduction, the type isList<String>notArrayList<String>.- Returns:
- the type
-