Class GenericMetadataSupport.FromParameterizedTypeGenericMetadataSupport
- java.lang.Object
-
- org.mockito.internal.util.reflection.GenericMetadataSupport
-
- org.mockito.internal.util.reflection.GenericMetadataSupport.FromParameterizedTypeGenericMetadataSupport
-
- Enclosing class:
- GenericMetadataSupport
private static class GenericMetadataSupport.FromParameterizedTypeGenericMetadataSupport extends GenericMetadataSupport
Generic metadata implementation for "standalone"ParameterizedType
.Offer support to retrieve generic metadata on a
ParameterizedType
by reading type variables of the related raw type and declared type variable of this parameterized type.This class is not designed to work on ParameterizedType returned by
Method.getGenericReturnType()
, as the ParameterizedType instance return in these cases could have Type Variables that refer to type declaration(s). That's what meant the "standalone" word at the beginning of the Javadoc. Instead useGenericMetadataSupport.ParameterizedReturnType
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.mockito.internal.util.reflection.GenericMetadataSupport
GenericMetadataSupport.BoundedType, GenericMetadataSupport.TypeVarBoundedType, GenericMetadataSupport.WildCardBoundedType
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.reflect.ParameterizedType
parameterizedType
-
Fields inherited from class org.mockito.internal.util.reflection.GenericMetadataSupport
contextualActualTypeParameters
-
-
Constructor Summary
Constructors Constructor Description FromParameterizedTypeGenericMetadataSupport(java.lang.reflect.ParameterizedType parameterizedType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<?>
rawType()
private void
readActualTypeParameters()
-
Methods inherited from class org.mockito.internal.util.reflection.GenericMetadataSupport
actualTypeArguments, extractRawTypeOf, extraInterfaces, getActualTypeArgumentFor, hasRawExtraInterfaces, inferFrom, rawExtraInterfaces, registerAllTypeVariables, registerTypeParametersOn, registerTypeVariablesOn, resolveGenericReturnType
-
-
-
-
Method Detail
-
readActualTypeParameters
private void readActualTypeParameters()
-
rawType
public java.lang.Class<?> rawType()
- Specified by:
rawType
in classGenericMetadataSupport
- Returns:
- Raw type of the current instance.
-
-