class ConstructorInvocation<T> extends java.lang.Object implements InvocationInterceptor.Invocation<T>, ReflectiveInvocationContext<java.lang.reflect.Constructor<T>>
| Modifier and Type | Field and Description |
|---|---|
private java.lang.Object[] |
arguments |
private java.lang.reflect.Constructor<T> |
constructor |
| Constructor and Description |
|---|
ConstructorInvocation(java.lang.reflect.Constructor<T> constructor,
java.lang.Object[] arguments) |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.lang.Object> |
getArguments()
Get the arguments of the executable in this invocation context.
|
java.lang.reflect.Constructor<T> |
getExecutable()
Get the method or constructor of this invocation context.
|
java.util.Optional<java.lang.Object> |
getTarget()
Get the target object of this invocation context, if available.
|
java.lang.Class<?> |
getTargetClass()
Get the target class of this invocation context.
|
T |
proceed()
Proceed with this invocation.
|
private final java.lang.reflect.Constructor<T> constructor
private final java.lang.Object[] arguments
ConstructorInvocation(java.lang.reflect.Constructor<T> constructor, java.lang.Object[] arguments)
public java.lang.Class<?> getTargetClass()
ReflectiveInvocationContextIf 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.
getTargetClass in interface ReflectiveInvocationContext<java.lang.reflect.Constructor<T>>nullpublic java.lang.reflect.Constructor<T> getExecutable()
ReflectiveInvocationContextgetExecutable in interface ReflectiveInvocationContext<java.lang.reflect.Constructor<T>>nullpublic java.util.List<java.lang.Object> getArguments()
ReflectiveInvocationContextgetArguments in interface ReflectiveInvocationContext<java.lang.reflect.Constructor<T>>nullpublic java.util.Optional<java.lang.Object> getTarget()
ReflectiveInvocationContextIf 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().
getTarget in interface ReflectiveInvocationContext<java.lang.reflect.Constructor<T>>null but potentially emptypublic T proceed()
InvocationInterceptor.Invocationproceed in interface InvocationInterceptor.Invocation<T>null.