Package org.mockito.plugins
Interface MemberAccessor
- All Known Implementing Classes:
ModuleMemberAccessor
,ReflectionMemberAccessor
public interface MemberAccessor
A member accessor is responsible for invoking methods, constructors and for setting
and reading field values.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
static interface
-
Method Summary
Modifier and TypeMethodDescriptionnewInstance
(Constructor<?> constructor, Object... arguments) default Object
newInstance
(Constructor<?> constructor, MemberAccessor.OnConstruction onConstruction, Object... arguments) void
-
Method Details
-
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
- Throws:
IllegalAccessException
-
set
- Throws:
IllegalAccessException
-