Class GenericMaster
- java.lang.Object
-
- org.mockito.internal.util.reflection.GenericMaster
-
public class GenericMaster extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description GenericMaster()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.Class<?>
getaClass(java.lang.reflect.Type generic)
java.lang.Class<?>
getGenericType(java.lang.reflect.Field field)
Finds the generic type (parametrized type) of the field.java.lang.Class<?>
getGenericType(java.lang.reflect.Parameter parameter)
Resolves the type (parametrized type) of the parameter.
-
-
-
Method Detail
-
getGenericType
public java.lang.Class<?> getGenericType(java.lang.reflect.Field field)
Finds the generic type (parametrized type) of the field. If the field is not generic it returns Object.class.- Parameters:
field
- the field to inspect
-
getGenericType
public java.lang.Class<?> getGenericType(java.lang.reflect.Parameter parameter)
Resolves the type (parametrized type) of the parameter. If the field is not generic it returns Object.class.- Parameters:
parameter
- the parameter to inspect
-
getaClass
private java.lang.Class<?> getaClass(java.lang.reflect.Type generic)
-
-