Annotation Type JdkProxyHint


  • @Repeatable(JdkProxyHints.class)
    @Retention(RUNTIME)
    public @interface JdkProxyHint
    Used by NativeHint annotations to indicate which interfaces (since only JDK dynamic proxies are supported) sets of types need proxies. Interface references via the types() member are the preferred form of use but sometimes due to accessibility restrictions or nested types the type names may need to be specified in the typeNames() member. The ordering of types when building a proxy is important, therefore we don't allow mixing the class reference and string styles as it may not result in the ordering you entered the attributes in at the source level. In these cases it is best to simple use the typeNames attribute (the ordering within a particular attribute is guaranteed).
    Author:
    Andy Clement, Sebastien Deleuze
    See Also:
    Dynamic proxy in native image
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      String[] typeNames
      Alternative way to configure interfaces for a given JDK dynamic proxy, should be used when type visibility prevents using Class references, or for nested types which should be specific using a $ separator (for example com.example.Foo$Bar).
      Class<?>[] types
      Preferred way to configure interfaces for a given JDK dynamic proxy.
    • Element Detail

      • types

        Class<?>[] types
        Preferred way to configure interfaces for a given JDK dynamic proxy.
        Returns:
        the types
        Default:
        {}
      • typeNames

        String[] typeNames
        Alternative way to configure interfaces for a given JDK dynamic proxy, should be used when type visibility prevents using Class references, or for nested types which should be specific using a $ separator (for example com.example.Foo$Bar).
        Returns:
        the type names
        Default:
        {}