Class ReflectionMemberAccessor
java.lang.Object
org.mockito.internal.util.reflection.ReflectionMemberAccessor
- All Implemented Interfaces:
MemberAccessor
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.mockito.plugins.MemberAccessor
MemberAccessor.ConstructionDispatcher, MemberAccessor.OnConstruction
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnewInstance
(Constructor<?> constructor, Object... arguments) newInstance
(Constructor<?> constructor, MemberAccessor.OnConstruction onConstruction, Object... arguments) void
private static void
silentSetAccessible
(AccessibleObject object, boolean value)
-
Constructor Details
-
ReflectionMemberAccessor
public ReflectionMemberAccessor()
-
-
Method Details
-
newInstance
public Object newInstance(Constructor<?> constructor, Object... arguments) throws InstantiationException, InvocationTargetException, IllegalAccessException - Specified by:
newInstance
in interfaceMemberAccessor
- Throws:
InstantiationException
InvocationTargetException
IllegalAccessException
-
newInstance
public Object newInstance(Constructor<?> constructor, MemberAccessor.OnConstruction onConstruction, Object... arguments) throws InstantiationException, InvocationTargetException, IllegalAccessException - Specified by:
newInstance
in interfaceMemberAccessor
- Throws:
InstantiationException
InvocationTargetException
IllegalAccessException
-
invoke
public Object invoke(Method method, Object target, Object... arguments) throws InvocationTargetException, IllegalAccessException - Specified by:
invoke
in interfaceMemberAccessor
- Throws:
InvocationTargetException
IllegalAccessException
-
get
- Specified by:
get
in interfaceMemberAccessor
- Throws:
IllegalAccessException
-
set
- Specified by:
set
in interfaceMemberAccessor
- Throws:
IllegalAccessException
-
silentSetAccessible
-