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 Details

    • forDataBinding

      AotTypeConfiguration forDataBinding()
      Configure the referenced type for data binding. In case of Annotation only data ones are considered. For more fine-grained control use forReflectiveAccess(MemberCategory...).
      Returns:
      this.
    • forReflectiveAccess

      AotTypeConfiguration forReflectiveAccess(MemberCategory... categories)
      Configure the referenced type for reflective access by providing at least one MemberCategory.
      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 configuration spring.aot.data.accessors.include / spring.aot.data.accessors.exclude

      Returns:
      this.
    • usedAsProjectionInterface

      default AotTypeConfiguration usedAsProjectionInterface()
      Configure the referenced type as a projection interface returned by eg. a query method.

      Shortcut for proxyInterface(TargetAware, SpringProxy, DecoratingProxy)

      Returns:
      this.
    • springProxy

      default AotTypeConfiguration springProxy()
      Configure the referenced type as a spring proxy interface.

      Shortcut for proxyInterface(SpringProxy, Advised, DecoratingProxy)

      Returns:
      this.
    • repositoryProxy

      default AotTypeConfiguration repositoryProxy()
      Configure the referenced type as a repository proxy.
      Returns:
      this.
    • proxyInterface

      AotTypeConfiguration proxyInterface(List<TypeReference> proxyInterfaces)
      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

      default AotTypeConfiguration proxyInterface(Class<?>... proxyInterfaces)
      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 potential Q types.
      Returns:
      this.
    • contribute

      void contribute(Environment environment, GenerationContext generationContext)
      Write the configuration to the given GenerationContext.
      Parameters:
      environment - must not be null.
      generationContext - must not be null.