类 ReflectionHints

java.lang.Object
cn.taketoday.aot.hint.ReflectionHints

public class ReflectionHints extends Object
Gather the need for reflection at runtime.
从以下版本开始:
4.0
作者:
Stephane Nicoll, Phillip Webb, Andy Wilkinson, Sebastien Deleuze
  • 字段详细资料

  • 构造器详细资料

    • ReflectionHints

      public ReflectionHints()
  • 方法详细资料

    • typeHints

      public Stream<TypeHint> typeHints()
      Return the types that require reflection.
      返回:
      the type hints
    • getTypeHint

      @Nullable public TypeHint getTypeHint(TypeReference type)
      Return the reflection hints for the type defined by the specified TypeReference.
      参数:
      type - the type to inspect
      返回:
      the reflection hints for this type, or null
    • getTypeHint

      @Nullable public TypeHint getTypeHint(Class<?> type)
      Return the reflection hints for the specified type.
      参数:
      type - the type to inspect
      返回:
      the reflection hints for this type, or null
    • registerType

      public ReflectionHints registerType(TypeReference type, Consumer<TypeHint.Builder> typeHint)
      Register or customize reflection hints for the type defined by the specified TypeReference.
      参数:
      type - the type to customize
      typeHint - a builder to further customize hints for that type
      返回:
      this, to facilitate method chaining
      另请参阅:
    • registerType

      public ReflectionHints registerType(TypeReference type, MemberCategory... memberCategories)
      Register or customize reflection hints for the specified type using the specified MemberCategories.
      参数:
      type - the type to customize
      memberCategories - the member categories to apply
      返回:
      this, to facilitate method chaining
    • registerType

      public ReflectionHints registerType(Class<?> type, Consumer<TypeHint.Builder> typeHint)
      Register or customize reflection hints for the specified type.
      参数:
      type - the type to customize
      typeHint - a builder to further customize hints for that type
      返回:
      this, to facilitate method chaining
      另请参阅:
    • registerType

      public ReflectionHints registerType(Class<?> type, MemberCategory... memberCategories)
      Register or customize reflection hints for the specified type using the specified MemberCategories.
      参数:
      type - the type to customize
      memberCategories - the member categories to apply
      返回:
      this, to facilitate method chaining
    • registerTypeIfPresent

      public ReflectionHints registerTypeIfPresent(@Nullable ClassLoader classLoader, String typeName, Consumer<TypeHint.Builder> typeHint)
      Register or customize reflection hints for the specified type if it is available using the specified ClassLoader.
      参数:
      classLoader - the classloader to use to check if the type is present
      typeName - the type to customize
      typeHint - a builder to further customize hints for that type
      返回:
      this, to facilitate method chaining
      另请参阅:
    • registerTypeIfPresent

      public ReflectionHints registerTypeIfPresent(@Nullable ClassLoader classLoader, String typeName, MemberCategory... memberCategories)
      Register or customize reflection hints for the specified type if it is available using the specified ClassLoader.
      参数:
      classLoader - the classloader to use to check if the type is present
      typeName - the type to customize
      memberCategories - the member categories to apply
      返回:
      this, to facilitate method chaining
    • registerTypes

      public ReflectionHints registerTypes(Iterable<TypeReference> types, Consumer<TypeHint.Builder> typeHint)
      Register or customize reflection hints for the types defined by the specified list of type references. The specified typeHint consumer is invoked for each type.
      参数:
      types - the types to customize
      typeHint - a builder to further customize hints for each type
      返回:
      this, to facilitate method chaining
    • registerField

      public ReflectionHints registerField(Field field)
      Register the need for reflection on the specified Field.
      参数:
      field - the field that requires reflection
      返回:
      this, to facilitate method chaining
    • registerConstructor

      public ReflectionHints registerConstructor(Constructor<?> constructor, ExecutableMode mode)
      Register the need for reflection on the specified Constructor, using the specified ExecutableMode.
      参数:
      constructor - the constructor that requires reflection
      mode - the requested mode
      返回:
      this, to facilitate method chaining
    • registerMethod

      public ReflectionHints registerMethod(Method method, ExecutableMode mode)
      Register the need for reflection on the specified Method, using the specified ExecutableMode.
      参数:
      method - the method that requires reflection
      mode - the requested mode
      返回:
      this, to facilitate method chaining
    • mapParameters

      private List<TypeReference> mapParameters(Executable executable)