Top Description Methods
org.springframework.expression

public Interface ConstructorExecutor

Known Direct Implementers
org.springframework.expression.spel.support.ReflectiveConstructorExecutor
Annotations
@FunctionalInterface

A ConstructorExecutor is built by a ConstructorResolver and can be cached by the infrastructure to repeat an operation quickly without going back to the resolvers.

For example, the particular constructor to execute on a class may be discovered by a ConstructorResolver which then builds a ConstructorExecutor that executes that constructor, and the resolved ConstructorExecutor can be reused without needing to go back to the resolvers to discover the constructor again.

If a ConstructorExecutor becomes stale, it should throw an AccessException which signals to the infrastructure to go back to the resolvers to ask for a new one.

Authors
Andy Clement, Sam Brannen
Since
3.0
See Also
ConstructorResolver, MethodExecutor

Method Summary

Modifier and TypeMethod and Description
public TypedValue

Returns:

the new object
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
)

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

Method Detail

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

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

Exceptions
AccessException:
if there is a problem executing the constructor or if this ConstructorExecutor has become stale