Class GenericMaster

java.lang.Object
org.mockito.internal.util.reflection.GenericMaster

public class GenericMaster extends Object
  • Constructor Details

    • GenericMaster

      public GenericMaster()
  • Method Details

    • getGenericType

      public Class<?> getGenericType(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 Class<?> getGenericType(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 Class<?> getaClass(Type generic)