Top Description Fields Constructors Methods
org.springframework.aot.hint

public Class ProxyHints

extends Object
Class Inheritance
Imports
java.util.LinkedHashSet, .Set, java.util.function.Consumer, java.util.stream.Stream

Gather the need for using proxies at runtime.
Author
Stephane Nicoll
Since
6.0

Field Summary

Modifier and TypeField and Description
private final Set<JdkProxyHint>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Stream<JdkProxyHint>

Returns:

a stream of JdkProxyHint
jdkProxyHints
()

Return the interface-based proxies that are required.

public ProxyHints

Returns:

this, to facilitate method chaining
registerJdkProxy
(Consumer<JdkProxyHint.Builder>
the consumer of the hint builder
jdkProxyHint
)

Register a JdkProxyHint.

public ProxyHints

Returns:

this, to facilitate method chaining
registerJdkProxy
(TypeReference...
the type references for the interfaces the proxy should implement
proxiedInterfaces
)

Register that a JDK proxy implementing the interfaces defined by the specified type references is required.

public ProxyHints

Returns:

this, to facilitate method chaining
registerJdkProxy
(Class<?>...
the interfaces the proxy should implement
proxiedInterfaces
)

Register that a JDK proxy implementing the specified interfaces is required.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

jdkProxiesback to summary
private final Set<JdkProxyHint> jdkProxies

Constructor Detail

ProxyHintsback to summary
public ProxyHints()

Method Detail

jdkProxyHintsback to summary
public Stream<JdkProxyHint> jdkProxyHints()

Return the interface-based proxies that are required.

Returns:Stream<JdkProxyHint>

a stream of JdkProxyHint

registerJdkProxyback to summary
public ProxyHints registerJdkProxy(Consumer<JdkProxyHint.Builder> jdkProxyHint)

Register a JdkProxyHint.

Parameters
jdkProxyHint:Consumer<JdkProxyHint.Builder>

the consumer of the hint builder

Returns:ProxyHints

this, to facilitate method chaining

registerJdkProxyback to summary
public ProxyHints registerJdkProxy(TypeReference... proxiedInterfaces)

Register that a JDK proxy implementing the interfaces defined by the specified type references is required.

Parameters
proxiedInterfaces:TypeReference[]

the type references for the interfaces the proxy should implement

Returns:ProxyHints

this, to facilitate method chaining

registerJdkProxyback to summary
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:Class<?>[]

the interfaces the proxy should implement

Returns:ProxyHints

this, to facilitate method chaining