类 TypeHint.Builder

java.lang.Object
cn.taketoday.aot.hint.TypeHint.Builder
封闭类:
TypeHint

public static class TypeHint.Builder extends Object
Builder for TypeHint.
  • 字段详细资料

  • 构造器详细资料

  • 方法详细资料

    • onReachableType

      public TypeHint.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.
      参数:
      reachableType - the type that should be reachable for this hint to apply
      返回:
      this, to facilitate method chaining
    • onReachableType

      public TypeHint.Builder 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.
      参数:
      reachableType - the type that should be reachable for this hint to apply
      返回:
      this, to facilitate method chaining
    • withField

      public TypeHint.Builder withField(String name)
      Register the need for reflection on the field with the specified name.
      参数:
      name - the name of the field
      返回:
      this, to facilitate method chaining
    • withConstructor

      public TypeHint.Builder withConstructor(List<TypeReference> parameterTypes, ExecutableMode mode)
      Register the need for reflection on the constructor with the specified parameter types, using the specified ExecutableMode.
      参数:
      parameterTypes - the parameter types of the constructor
      mode - 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 constructor
      constructorHint - 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 specified ExecutableMode.
      参数:
      name - the name of the method
      parameterTypes - the parameter types of the constructor
      mode - 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 method
      parameterTypes - the parameter types of the constructor
      methodHint - a builder to further customize the hints of this method
      返回:
      this, to facilitate method chaining
    • withMembers

      public TypeHint.Builder withMembers(MemberCategory... memberCategories)
      Adds the specified member categories.
      参数:
      memberCategories - the categories to apply
      返回:
      this, to facilitate method chaining
      另请参阅:
    • build

      TypeHint build()
      Create a TypeHint based on the state of this builder.
      返回:
      a type hint