Class MockedType

java.lang.Object
mockit.internal.injection.InjectionProvider
mockit.internal.expectations.mocking.MockedType

public final class MockedType extends InjectionProvider
  • Field Details

    • field

      @Nullable public final Field field
    • injectable

      public final boolean injectable
  • Constructor Details

    • MockedType

      public MockedType(@NonNull Field field)
  • Method Details

    • getClassOfDeclaredType

      @NonNull public Class<?> getClassOfDeclaredType()
      Specified by:
      getClassOfDeclaredType in class InjectionProvider
    • getClassType

      @NonNull public Class<?> getClassType()
      Returns:
      the class object corresponding to the type to be mocked, or TypeVariable.class in case the mocked type is a type variable (which usually occurs when the mocked type implements/extends multiple types)
    • getMaxInstancesToCapture

      public int getMaxInstancesToCapture()
    • getValue

      @Nullable public Object getValue(@Nullable Object owner)
      Overrides:
      getValue in class InjectionProvider
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object