Class JdkProxyHint

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

public final class JdkProxyHint extends Object implements ConditionalHint
A hint that describes the need for a JDK interface-based Proxy.
Since:
6.0
Author:
Stephane Nicoll, Brian Clozel
  • Method Details

    • of

      public static JdkProxyHint.Builder of(TypeReference... proxiedInterfaces)
      Initialize a builder with the proxied interfaces to use.
      Parameters:
      proxiedInterfaces - the interfaces the proxy should implement
      Returns:
      a builder for the hint
    • of

      public static JdkProxyHint.Builder of(Class<?>... proxiedInterfaces)
      Initialize a builder with the proxied interfaces to use.
      Parameters:
      proxiedInterfaces - the interfaces the proxy should implement
      Returns:
      a builder for the hint
    • 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