Package org.mockito.plugins
Interface MemberAccessor
-
public interface MemberAccessorA 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 interfaceMemberAccessor.ConstructionDispatcherstatic interfaceMemberAccessor.OnConstruction
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Objectget(Field field, Object target)Objectinvoke(Method method, Object target, Object... arguments)ObjectnewInstance(Constructor<?> constructor, Object... arguments)default ObjectnewInstance(Constructor<?> constructor, MemberAccessor.OnConstruction onConstruction, Object... arguments)voidset(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
-
-