java.lang.reflect
Interface ParameterizedType
- All Superinterfaces:
- Type
- public interface ParameterizedType
- extends Type
The ParameterizedType
interface describes the behavior
of parameterized types such as Collection<Applet>
or
HashMap<String, Class>
.
Note that implementations of this interface are free to return
distinct objects for the same parameterized type; the identity of
an objects implementing this interface may not be used to test for identity
among the parameterized types they represent.
Method Summary |
Type[] |
getActualTypeArguments()
Returns an array of objects representing the type arguments used
to instantiate this parameterized type. |
Class |
getRawClass()
Returns a Class object representing the generic class
or interface that this parameterized type instantiates. |
getActualTypeArguments
public Type[] getActualTypeArguments()
- Returns an array of objects representing the type arguments used
to instantiate this parameterized type. The length of the array
is the exact number of type arguments to this parameterized type,
hence it is always at least 1.
- Returns:
- the actual type arguments to the parameterized type represented
by this object
getRawClass
public Class getRawClass()
- Returns a
Class
object representing the generic class
or interface that this parameterized type instantiates.
- Returns:
- the class or interface that this parameterized type instantiates