T
- the generic type parameter.public class GenericType<T>
extends java.lang.Object
T
.Modifier | Constructor and Description |
---|---|
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.
|
Modifier and Type | Method and Description |
---|---|
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. |
protected GenericType()
public GenericType(java.lang.reflect.Type genericType)
genericType
- the generic type.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.public final java.lang.reflect.Type getType()
Type
instance derived from the
type.public final java.lang.Class<T> getRawClass()
Copyright © 2016 Oracle Corporation. All Rights Reserved.