Interface ConstructorExecutor

public interface ConstructorExecutor

Executors are built by resolvers and can be cached by the infrastructure to repeat an operation quickly without going back to the resolvers. For example, the particular constructor to run on a class may be discovered by the reflection constructor resolver - it will then build a ConstructorExecutor that executes that constructor and the ConstructorExecutor can be reused without needing to go back to the resolver to discover the constructor again. They can become stale, and in that case should throw an AccessException - this will cause the infrastructure to go back to the resolvers to ask for a new one.

Andy Clement

Method Summary
 TypedValue execute(EvaluationContext context, Object... arguments)
          Execute a constructor in the specified context using the specified arguments.

Method Detail


TypedValue execute(EvaluationContext context,
                   Object... arguments)
                   throws AccessException
Execute a constructor in the specified context using the specified arguments.

context - the evaluation context in which the command is being executed
arguments - the arguments to the constructor call, should match (in terms of number and type) whatever the command will need to run
the new object
AccessException - if there is a problem executing the command or the CommandExecutor is no longer valid