Class ConstructorInvocation<T>
java.lang.Object
org.junit.jupiter.engine.execution.ConstructorInvocation<T>
- All Implemented Interfaces:
InvocationInterceptor.Invocation<T>,ReflectiveInvocationContext<Constructor<T>>
class ConstructorInvocation<T>
extends Object
implements InvocationInterceptor.Invocation<T>, ReflectiveInvocationContext<Constructor<T>>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the arguments of the executable in this invocation context.Get the method or constructor of this invocation context.Get the target object of this invocation context, if available.Class<?>Get the target class of this invocation context.proceed()Proceed with this invocation.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.junit.jupiter.api.extension.InvocationInterceptor.Invocation
skip
-
Field Details
-
constructor
-
arguments
-
-
Constructor Details
-
ConstructorInvocation
ConstructorInvocation(Constructor<T> constructor, Object[] arguments)
-
-
Method Details
-
getTargetClass
Description copied from interface:ReflectiveInvocationContextGet the target class of this invocation context.If this invocation context represents an instance method, this method returns the class of the object the method will be invoked on, not the class it is declared in. Otherwise, if this invocation represents a static method or constructor, this method returns the class the method or constructor is declared in.
- Specified by:
getTargetClassin interfaceReflectiveInvocationContext<T>- Returns:
- the target class of this invocation context; never
null
-
getExecutable
Description copied from interface:ReflectiveInvocationContextGet the method or constructor of this invocation context.- Specified by:
getExecutablein interfaceReflectiveInvocationContext<T>- Returns:
- the executable of this invocation context; never
null
-
getArguments
Description copied from interface:ReflectiveInvocationContextGet the arguments of the executable in this invocation context.- Specified by:
getArgumentsin interfaceReflectiveInvocationContext<T>- Returns:
- the arguments of the executable in this invocation context;
immutable and never
null
-
getTarget
Description copied from interface:ReflectiveInvocationContextGet the target object of this invocation context, if available.If this invocation context represents an instance method, this method returns the object the method will be invoked on. Otherwise, if this invocation context represents a static method or constructor, this method returns
empty().- Specified by:
getTargetin interfaceReflectiveInvocationContext<T>- Returns:
- the target of the executable of this invocation context; never
nullbut potentially empty
-
proceed
Description copied from interface:InvocationInterceptor.InvocationProceed with this invocation.- Specified by:
proceedin interfaceInvocationInterceptor.Invocation<T>- Returns:
- the result of this invocation; potentially
null.
-