Class ProxyHints

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

public class ProxyHints extends Object
Gather the need for using proxies at runtime.
Since:
6.0
Author:
Stephane Nicoll
  • Constructor Details

    • ProxyHints

      public ProxyHints()
  • Method Details

    • jdkProxyHints

      public Stream<JdkProxyHint> jdkProxyHints()
      Return the interface-based proxies that are required.
      Returns:
      a stream of JdkProxyHint
    • registerJdkProxy

      public ProxyHints registerJdkProxy(Consumer<JdkProxyHint.Builder> jdkProxyHint)
      Register a JdkProxyHint.
      Parameters:
      jdkProxyHint - the consumer of the hint builder
      Returns:
      this, to facilitate method chaining
    • registerJdkProxy

      public ProxyHints registerJdkProxy(TypeReference... proxiedInterfaces)
      Register that a JDK proxy implementing the interfaces defined by the specified type references is required.
      Parameters:
      proxiedInterfaces - the type references for the interfaces the proxy should implement
      Returns:
      this, to facilitate method chaining
    • registerJdkProxy

      public ProxyHints registerJdkProxy(Class<?>... proxiedInterfaces)
      Register that a JDK proxy implementing the specified interfaces is required.

      When registering a JDK proxy for Spring AOP, consider using AopProxyUtils.completeJdkProxyInterfaces() for convenience.

      Parameters:
      proxiedInterfaces - the interfaces the proxy should implement
      Returns:
      this, to facilitate method chaining