private static class TypeFactory.GenericsReifiedType extends ReifiedType
| Modifier and Type | Field and Description |
|---|---|
private java.util.List<ReifiedType> |
arguments |
private int |
size |
| Constructor and Description |
|---|
GenericsReifiedType(java.lang.Class<?> clazz) |
GenericsReifiedType(org.springframework.core.convert.TypeDescriptor descriptor) |
| Modifier and Type | Method and Description |
|---|---|
ReifiedType |
getActualTypeArgument(int i)
Return a type parameter for this type.
|
int |
size()
Return the number of type parameters for this type.
|
getRawClassprivate final java.util.List<ReifiedType> arguments
private final int size
GenericsReifiedType(java.lang.Class<?> clazz)
GenericsReifiedType(org.springframework.core.convert.TypeDescriptor descriptor)
public ReifiedType getActualTypeArgument(int i)
ReifiedTypei.
For example, in the following example:
Map<String, ? extends Metadata>type parameter 0 is
String, and type parameter 1 is
Metadata.
This implementation returns a Reified Type that has Object
as class. Any object is assignable to Object and therefore no conversion
is then necessary. This is compatible with versions of Java language
prior to Java 5.
This method should be overridden by a subclass that provides access to
the generic type parameter information for Java 5 and later.
getActualTypeArgument in class ReifiedTypei - The zero-based index of the requested type parameter.ReifiedType for the generic type parameter at
the specified index.public int size()
ReifiedType
This implementation returns 0. This method should be
overridden by a subclass that provides access to the generic type
parameter information for Java 5 and later.
size in class ReifiedType