Class TypeHint

java.lang.Object
org.springframework.aot.hint.TypeHint

public final class TypeHint extends Object
A hint that describes the need for reflection on a type.
Since:
6.0
Author:
Stephane Nicoll
  • Method Details

    • of

      public static TypeHint.Builder of(TypeReference type)
      Initialize a builder for the type defined by the specified TypeReference.
      Parameters:
      type - the type to use
      Returns:
      a builder
    • getType

      public TypeReference getType()
      Return the type that this hint handles.
      Returns:
      the type
    • getReachableType

      @Nullable public TypeReference getReachableType()
      Return the type that should be reachable for this hint to apply, or null if this hint should always been applied.
      Returns:
      the reachable type, if any
    • fields

      public Stream<FieldHint> fields()
      Return the fields that require reflection.
      Returns:
      a stream of FieldHint
    • constructors

      public Stream<ExecutableHint> constructors()
      Return the constructors that require reflection.
      Returns:
      a stream of ExecutableHint
    • methods

      public Stream<ExecutableHint> methods()
      Return the methods that require reflection.
      Returns:
      a stream of ExecutableHint
    • getMemberCategories

      public Set<MemberCategory> getMemberCategories()
      Return the member categories that apply.
      Returns:
      the member categories to enable
    • toString

      public String toString()
      Overrides:
      toString in class Object