Annotation Interface RegisterForProxy


@Retention(RUNTIME) @Target(TYPE) @Repeatable(List.class) public @interface RegisterForProxy
Annotation that can be used to force an interface (including its super interfaces) to be registered for dynamic proxy generation in native image mode.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static @interface 
    The repeatable holder for RegisterForProxy.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<?>[]
    Alternative interfaces that should actually be registered for dynamic proxy generation instead of the current interface.
  • Element Details

    • targets

      Class<?>[] targets
      Alternative interfaces that should actually be registered for dynamic proxy generation instead of the current interface. This allows for interfaces in 3rd party libraries to be registered without modification or writing an extension. If this is set then the interface it is placed on is not registered for dynamic proxy generation, so this should generally just be placed on an empty interface that is not otherwise used.
      Default:
      {}