Interface AotTypeConfiguration
public interface AotTypeConfiguration
Configuration object that captures various AOT configuration aspects of types within the data context by offering
predefined methods to register native configuration necessary for data binding, projection proxy definitions, AOT
cglib bytecode generation and other common tasks.
On contribute(Environment, GenerationContext) the configuration is added to the GenerationContext.
- Since:
- 4.0
- Author:
- Christoph Strobl
-
Method Summary
Modifier and TypeMethodDescriptionvoidcontribute(Environment environment, GenerationContext generationContext) Write the configuration to the givenGenerationContext.Contribute generated cglib accessors for the referenced type.Configure the referenced type for data binding.Configure the referenced type for usage with Querydsl by registering hints for potentialQtypes.forReflectiveAccess(MemberCategory... categories) Configure the referenced type for reflective access by providing at least oneMemberCategory.default AotTypeConfigurationproxyInterface(Class<?>... proxyInterfaces) Register a proxy for the referenced type that also implements the given proxyInterfaces.proxyInterface(List<TypeReference> proxyInterfaces) Register a proxy for the referenced type that also implements the given proxyInterfaces.default AotTypeConfigurationConfigure the referenced type as a repository proxy.default AotTypeConfigurationConfigure the referenced type as a spring proxy interface.default AotTypeConfigurationConfigure the referenced type as a projection interface returned by eg. a query method.
-
Method Details
-
forDataBinding
AotTypeConfiguration forDataBinding()Configure the referenced type for data binding. In case ofAnnotationonly data ones are considered. For more fine-grained control useforReflectiveAccess(MemberCategory...).- Returns:
- this.
-
forReflectiveAccess
Configure the referenced type for reflective access by providing at least oneMemberCategory.- Parameters:
categories- must not contain null.- Returns:
- this.
-
contributeAccessors
AotTypeConfiguration contributeAccessors()Contribute generated cglib accessors for the referenced type.Can be disabled by user configuration (
spring.aot.data.accessors.enabled). Honors in/exclusions set by user configurationspring.aot.data.accessors.include/spring.aot.data.accessors.exclude- Returns:
- this.
-
usedAsProjectionInterface
Configure the referenced type as a projection interface returned by eg. a query method.Shortcut for
proxyInterface(TargetAware, SpringProxy, DecoratingProxy)- Returns:
- this.
-
springProxy
Configure the referenced type as a spring proxy interface.Shortcut for
proxyInterface(SpringProxy, Advised, DecoratingProxy)- Returns:
- this.
-
repositoryProxy
Configure the referenced type as a repository proxy.- Returns:
- this.
-
proxyInterface
Register a proxy for the referenced type that also implements the given proxyInterfaces.- Parameters:
proxyInterfaces- additional interfaces the proxy implements. Order matters!- Returns:
- this.
-
proxyInterface
Register a proxy for the referenced type that also implements the given proxyInterfaces.- Parameters:
proxyInterfaces- additional interfaces the proxy implements. Order matters!- Returns:
- this.
-
forQuerydsl
AotTypeConfiguration forQuerydsl()Configure the referenced type for usage with Querydsl by registering hints for potentialQtypes.- Returns:
- this.
-
contribute
Write the configuration to the givenGenerationContext.- Parameters:
environment- must not be null.generationContext- must not be null.
-