Top Description Fields Constructors Methods
org.springframework.expression.spel.support

public Class ReflectiveConstructorExecutor

extends Object
implements ConstructorExecutor
Class Inheritance
All Implemented Interfaces
org.springframework.expression.ConstructorExecutor
Imports
java.lang.reflect.Constructor, org.springframework.expression.AccessException, .ConstructorExecutor, .EvaluationContext, .TypedValue, org.springframework.lang.Nullable, org.springframework.util.ReflectionUtils

A simple ConstructorExecutor implementation that runs a constructor using reflective invocation.
Authors
Andy Clement, Juergen Hoeller
Since
3.0

Field Summary

Modifier and TypeField and Description
private final Constructor<?>
private final Integer

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public TypedValue
execute(EvaluationContext
the evaluation context in which the constructor is being executed
context
,
Object...
the arguments to the constructor; should match (in terms of number and type) whatever the constructor will need to run
arguments
)

Implements org.springframework.expression.ConstructorExecutor.execute.

Execute a constructor in the specified context using the specified arguments.
public Constructor<?>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ctorback to summary
private final Constructor<?> ctor
varargsPositionback to summary
private final Integer varargsPosition
Annotations
@Nullable

Constructor Detail

ReflectiveConstructorExecutorback to summary
public ReflectiveConstructorExecutor(Constructor<?> ctor)

Method Detail

executeback to summary
public TypedValue execute(EvaluationContext context, Object... arguments) throws AccessException

Implements org.springframework.expression.ConstructorExecutor.execute.

Doc from org.springframework.expression.ConstructorExecutor.execute.

Execute a constructor in the specified context using the specified arguments.

Parameters
context:EvaluationContext

the evaluation context in which the constructor is being executed

arguments:Object[]

the arguments to the constructor; should match (in terms of number and type) whatever the constructor will need to run

Returns:TypedValue

the new object

Annotations
@Override
Exceptions
AccessException:
if there is a problem executing the constructor or if this ConstructorExecutor has become stale
getConstructorback to summary
public Constructor<?> getConstructor()