Save This Page
Home » openjdk-7 » java » lang » reflect » [javadoc | source]
java.lang.reflect
public interface: ParameterizedType [javadoc | source]

All Implemented Interfaces:
    Type

ParameterizedType represents a parameterized type such as Collection<String>.

A parameterized type is created the first time it is needed by a reflective method, as specified in this package. When a parameterized type p is created, the generic type declaration that p instantiates is resolved, and all type arguments of p are created recursively. See TypeVariable for details on the creation process for type variables. Repeated creation of a parameterized type has no effect.

Instances of classes that implement this interface must implement an equals() method that equates any two instances that share the same generic type declaration and have equal type parameters.

Method from java.lang.reflect.ParameterizedType Summary:
getActualTypeArguments,   getOwnerType,   getRawType
Method from java.lang.reflect.ParameterizedType Detail:
 public Type[] getActualTypeArguments()
    Returns an array of {@code Type} objects representing the actual type arguments to this type.

    Note that in some cases, the returned array be empty. This can occur if this type represents a non-parameterized type nested within a parameterized type.

 public Type getOwnerType()
    Returns a {@code Type} object representing the type that this type is a member of. For example, if this type is {@code O.I}, return a representation of {@code O}.

    If this type is a top-level type, {@code null} is returned.

 public Type getRawType()
    Returns the {@code Type} object representing the class or interface that declared this type.