类 TypeHint.Builder
java.lang.Object
cn.taketoday.aot.hint.TypeHint.Builder
- 封闭类:
- TypeHint
Builder for
TypeHint.-
字段概要
字段修饰符和类型字段说明private final Map<TypeHint.ExecutableKey,ExecutableHint.Builder> private final Set<MemberCategory>private final Map<TypeHint.ExecutableKey,ExecutableHint.Builder> private TypeReferenceprivate final TypeReference -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明(专用程序包) TypeHintbuild()Create aTypeHintbased on the state of this builder.onReachableType(TypeReference reachableType) Make this hint conditional on the fact that the specified type is in a reachable code path from a static analysis point of view.onReachableType(Class<?> reachableType) Make this hint conditional on the fact that the specified type is in a reachable code path from a static analysis point of view.withConstructor(List<TypeReference> parameterTypes, ExecutableMode mode) Register the need for reflection on the constructor with the specified parameter types, using the specifiedExecutableMode.private TypeHint.BuilderwithConstructor(List<TypeReference> parameterTypes, Consumer<ExecutableHint.Builder> constructorHint) Register the need for reflection on the constructor with the specified parameter types.Register the need for reflection on the field with the specified name.withMembers(MemberCategory... memberCategories) Adds the specified member categories.withMethod(String name, List<TypeReference> parameterTypes, ExecutableMode mode) Register the need for reflection on the method with the specified name and parameter types, using the specifiedExecutableMode.private TypeHint.BuilderwithMethod(String name, List<TypeReference> parameterTypes, Consumer<ExecutableHint.Builder> methodHint) Register the need for reflection on the method with the specified name and parameter types.
-
字段详细资料
-
type
-
reachableType
-
fields
-
constructors
-
methods
-
memberCategories
-
-
构造器详细资料
-
Builder
Builder(TypeReference type)
-
-
方法详细资料
-
onReachableType
Make this hint conditional on the fact that the specified type is in a reachable code path from a static analysis point of view.- 参数:
reachableType- the type that should be reachable for this hint to apply- 返回:
this, to facilitate method chaining
-
onReachableType
Make this hint conditional on the fact that the specified type is in a reachable code path from a static analysis point of view.- 参数:
reachableType- the type that should be reachable for this hint to apply- 返回:
this, to facilitate method chaining
-
withField
Register the need for reflection on the field with the specified name.- 参数:
name- the name of the field- 返回:
this, to facilitate method chaining
-
withConstructor
Register the need for reflection on the constructor with the specified parameter types, using the specifiedExecutableMode.- 参数:
parameterTypes- the parameter types of the constructormode- the requested mode- 返回:
this, to facilitate method chaining
-
withConstructor
private TypeHint.Builder withConstructor(List<TypeReference> parameterTypes, Consumer<ExecutableHint.Builder> constructorHint) Register the need for reflection on the constructor with the specified parameter types.- 参数:
parameterTypes- the parameter types of the constructorconstructorHint- a builder to further customize the hints of this constructor- 返回:
this, to facilitate method chaining
-
withMethod
public TypeHint.Builder withMethod(String name, List<TypeReference> parameterTypes, ExecutableMode mode) Register the need for reflection on the method with the specified name and parameter types, using the specifiedExecutableMode.- 参数:
name- the name of the methodparameterTypes- the parameter types of the constructormode- the requested mode- 返回:
this, to facilitate method chaining
-
withMethod
private TypeHint.Builder withMethod(String name, List<TypeReference> parameterTypes, Consumer<ExecutableHint.Builder> methodHint) Register the need for reflection on the method with the specified name and parameter types.- 参数:
name- the name of the methodparameterTypes- the parameter types of the constructormethodHint- a builder to further customize the hints of this method- 返回:
this, to facilitate method chaining
-
withMembers
Adds the specified member categories.- 参数:
memberCategories- the categories to apply- 返回:
this, to facilitate method chaining- 另请参阅:
-
build
TypeHint build()Create aTypeHintbased on the state of this builder.- 返回:
- a type hint
-