Package org.mockito.plugins
Interface MemberAccessor
-
public interface MemberAccessor
A member accessor is responsible for invoking methods, constructors and for setting and reading field values.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
MemberAccessor.ConstructionDispatcher
static interface
MemberAccessor.OnConstruction
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Object
get(Field field, Object target)
Object
invoke(Method method, Object target, Object... arguments)
Object
newInstance(Constructor<?> constructor, Object... arguments)
default Object
newInstance(Constructor<?> constructor, MemberAccessor.OnConstruction onConstruction, Object... arguments)
void
set(Field field, Object target, Object value)
-
-
-
Method Detail
-
newInstance
Object newInstance(Constructor<?> constructor, Object... arguments) throws InstantiationException, InvocationTargetException, IllegalAccessException
-
newInstance
default Object newInstance(Constructor<?> constructor, MemberAccessor.OnConstruction onConstruction, Object... arguments) throws InstantiationException, InvocationTargetException, IllegalAccessException
-
invoke
Object invoke(Method method, Object target, Object... arguments) throws InvocationTargetException, IllegalAccessException
-
get
Object get(Field field, Object target) throws IllegalAccessException
- Throws:
IllegalAccessException
-
set
void set(Field field, Object target, Object value) throws IllegalAccessException
- Throws:
IllegalAccessException
-
-