接口 ConstructorResolver
- 所有已知实现类:
ReflectiveConstructorResolver
- 函数接口:
- 这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。
A constructor resolver attempts to locate a constructor and returns a
ConstructorExecutor that can be used to invoke that constructor.
The ConstructorExecutor will be cached, but if it becomes stale the
resolvers will be called again.
- 从以下版本开始:
- 4.0
- 作者:
- Andy Clement, Sam Brannen, Harry Yang
- 另请参阅:
-
方法概要
修饰符和类型方法说明resolve(EvaluationContext context, String typeName, List<TypeDescriptor> argumentTypes) Within the supplied context, resolve a suitable constructor on the supplied type that can handle the specified arguments.
-
方法详细资料
-
resolve
@Nullable ConstructorExecutor resolve(EvaluationContext context, String typeName, List<TypeDescriptor> argumentTypes) throws AccessException Within the supplied context, resolve a suitable constructor on the supplied type that can handle the specified arguments.Returns a
ConstructorExecutorthat can be used to invoke that constructor (ornullif no constructor could be found).- 参数:
context- the current evaluation contexttypeName- the fully-qualified name of the type upon which to look for the constructorargumentTypes- the types of arguments that the constructor must be able to handle- 返回:
- a
ConstructorExecutorthat can invoke the constructor, ornullif the constructor cannot be found - 抛出:
AccessException
-