Class ClassProxyHint

java.lang.Object
org.springframework.aot.hint.ClassProxyHint
All Implemented Interfaces:
ConditionalHint

public final class ClassProxyHint extends Object implements ConditionalHint
A hint that describes the need for a proxy against a concrete class.
Since:
6.0
Author:
Stephane Nicoll, Brian Clozel
  • Method Details

    • of

      public static ClassProxyHint.Builder of(TypeReference typeReference)
      Initialize a builder with the target class to use.
      Parameters:
      typeReference - the type reference for the target class of the proxy
      Returns:
      a builder for the hint
    • of

      public static ClassProxyHint.Builder of(Class<?> targetClass)
      Initialize a builder with the target class to use.
      Parameters:
      targetClass - the target class of the proxy
      Returns:
      a builder for the hint
    • getTargetClass

      public TypeReference getTargetClass()
      Return the target class of the proxy.
      Returns:
      the target class
    • getProxiedInterfaces

      public List<TypeReference> getProxiedInterfaces()
      Return the interfaces to be proxied.
      Returns:
      the interfaces that the proxy should implement
    • getReachableType

      @Nullable public TypeReference getReachableType()
      Description copied from interface: ConditionalHint
      Return the type that should be reachable for this hint to apply, or null if this hint should always been applied.
      Specified by:
      getReachableType in interface ConditionalHint
      Returns:
      the reachable type, if any
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object