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()
ReflectiveInvocationContext
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.
getTargetClass
in interface ReflectiveInvocationContext<java.lang.reflect.Constructor<T>>
null
public java.lang.reflect.Constructor<T> getExecutable()
ReflectiveInvocationContext
getExecutable
in interface ReflectiveInvocationContext<java.lang.reflect.Constructor<T>>
null
public java.util.List<java.lang.Object> getArguments()
ReflectiveInvocationContext
getArguments
in interface ReflectiveInvocationContext<java.lang.reflect.Constructor<T>>
null
public java.util.Optional<java.lang.Object> getTarget()
ReflectiveInvocationContext
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()
.
getTarget
in interface ReflectiveInvocationContext<java.lang.reflect.Constructor<T>>
null
but potentially emptypublic T proceed()
InvocationInterceptor.Invocation
proceed
in interface InvocationInterceptor.Invocation<T>
null
.