接口 ConstructorExecutor

所有已知实现类:
ReflectiveConstructorExecutor

public interface ConstructorExecutor
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.

从以下版本开始:
4.0
作者:
Andy Clement, Sam Brannen, Harry Yang
  • 方法概要

    修饰符和类型
    方法
    说明
    execute(EvaluationContext context, Object... arguments)
    Execute a constructor in the specified context using the specified arguments.
  • 方法详细资料

    • execute

      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 constructor is being executed
      arguments - the arguments to the constructor; should match (in terms of number and type) whatever the constructor will need to run
      返回:
      the new object
      抛出:
      AccessException - if there is a problem executing the constructor or if this ConstructorExecutor has become stale