Annotation Interface RuntimeProxy


@Documented @Retention(SOURCE) @Target({ANNOTATION_TYPE,TYPE,METHOD}) public @interface RuntimeProxy
The annotation used to declare a runtime proxy.
Since:
5.0
Author:
Denis Stepanov
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The runtime proxy creator bean class that should be used at runtime to create a proxy.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    By default Micronaut will compile subclasses of the target class and call super.foo(..) to invoke the original method since this is more efficient and allows proxied methods to work for calls from within the class.
  • Element Details

    • value

      Class<? extends RuntimeProxyCreator> value
      The runtime proxy creator bean class that should be used at runtime to create a proxy.
      Returns:
      The runtime proxy creator bean class
    • proxyTarget

      boolean proxyTarget

      By default Micronaut will compile subclasses of the target class and call super.foo(..) to invoke the original method since this is more efficient and allows proxied methods to work for calls from within the class.

      However certain cases it may be useful to be able to to instead proxy all public methods of the original implementation. By setting the value here to true the Interceptor can specify that it requires proxying of the class

      Generated subclasses will implement InterceptedProxy if this attribute is set to true

      Returns:
      True if the original implementation should be proxied. Defaults to false.
      Default:
      false