Annotation Type SerializationHint


  • @Repeatable(SerializationHints.class)
    @Retention(RUNTIME)
    public @interface SerializationHint
    Used by NativeHint annotations to indicate which types should be serializable in a native image. Class 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.
    Author:
    Andy Clement, Sebastien Deleuze
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      String[] typeNames
      Alternative way to configure serialization if visibility prevents 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 types for serialization.
    • Element Detail

      • types

        Class<?>[] types
        Preferred way to configure types for serialization.
        Returns:
        the types
        Default:
        {}
      • typeNames

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