Class MockMethodAdvice
java.lang.Object
org.mockito.internal.creation.bytebuddy.inject.MockMethodDispatcher
org.mockito.internal.creation.bytebuddy.MockMethodAdvice
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class(package private) static class(package private) static classstatic class(package private) static class(package private) static @interfaceprivate static classprivate static classprivate static classprivate static classprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final net.bytebuddy.dynamic.scaffold.MethodGraph.Compilerprivate final WeakConcurrentMap<Class<?>, SoftReference<net.bytebuddy.dynamic.scaffold.MethodGraph>> private final Stringprivate final WeakConcurrentMap<Object, MockMethodInterceptor> private final DetachedThreadLocal<Map<Class<?>, MockMethodInterceptor>> private final ConstructionCallbackprivate final MockMethodAdvice.SelfCallInfo -
Constructor Summary
ConstructorsConstructorDescriptionMockMethodAdvice(WeakConcurrentMap<Object, MockMethodInterceptor> interceptors, DetachedThreadLocal<Map<Class<?>, MockMethodInterceptor>> mockedStatics, String identifier, Predicate<Class<?>> isMockConstruction, ConstructionCallback onConstruction) -
Method Summary
Modifier and TypeMethodDescriptionprivate static Callable<?> private static voidCallable<?> handleConstruction(Class<?> type, Object object, Object[] arguments, String[] parameterTypeNames) Callable<?> handleStatic(Class<?> type, Method origin, Object[] arguments) booleanisConstructorMock(Class<?> type) booleanbooleanbooleanisMockedStatic(Class<?> type) booleanisOverridden(Object instance, Method origin) (package private) static ThrowableremoveRecursiveCalls(Throwable cause, Class<?> declaringClass) private static ObjectMethods inherited from class MockMethodDispatcher
get, getStatic, handleConstruction, isConstructorMock, set
-
Field Details
-
interceptors
-
mockedStatics
-
identifier
-
selfCallInfo
-
compiler
private final net.bytebuddy.dynamic.scaffold.MethodGraph.Compiler compiler -
graphs
private final WeakConcurrentMap<Class<?>, SoftReference<net.bytebuddy.dynamic.scaffold.MethodGraph>> graphs -
isMockConstruction
-
onConstruction
-
-
Constructor Details
-
MockMethodAdvice
public MockMethodAdvice(WeakConcurrentMap<Object, MockMethodInterceptor> interceptors, DetachedThreadLocal<Map<Class<?>, MockMethodInterceptor>> mockedStatics, String identifier, Predicate<Class<?>> isMockConstruction, ConstructionCallback onConstruction)
-
-
Method Details
-
enter
-
exit
-
handle
-
handleStatic
- Specified by:
handleStaticin classMockMethodDispatcher- Throws:
Throwable
-
handleConstruction
public Object handleConstruction(Class<?> type, Object object, Object[] arguments, String[] parameterTypeNames) - Specified by:
handleConstructionin classMockMethodDispatcher
-
isMock
- Specified by:
isMockin classMockMethodDispatcher
-
isMocked
- Specified by:
isMockedin classMockMethodDispatcher
-
isMockedStatic
- Specified by:
isMockedStaticin classMockMethodDispatcher
-
isOverridden
- Specified by:
isOverriddenin classMockMethodDispatcher
-
isConstructorMock
- Specified by:
isConstructorMockin classMockMethodDispatcher
-
tryInvoke
-
removeRecursiveCalls
-