Class ReachabilityMetadata


  • @NullMarked
    public final class ReachabilityMetadata
    extends java.lang.Object
    Provides support for the reachability-metadata.json file format.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String FIELD_OR_METHOD_NAME
      Key used to specify the name of a field or method
      static java.lang.String FIELDS
      Key used to specify the list of fields available for reflection.
      static java.lang.String METHODS
      Key used to specify the list of methods available for reflection.
      static java.lang.String PARAMETER_TYPES
      Key used to list the method parameter types.
      static java.lang.String TYPE_NAME
      Key used to specify the name of a type.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void writeReflectConfig​(java.util.Collection<ReachabilityMetadata.Type> types, java.io.OutputStream output)
      Writes the contents of a reflect-config.json file.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • FIELD_OR_METHOD_NAME

        public static final java.lang.String FIELD_OR_METHOD_NAME
        Key used to specify the name of a field or method
        See Also:
        Constant Field Values
      • PARAMETER_TYPES

        public static final java.lang.String PARAMETER_TYPES
        Key used to list the method parameter types.
        See Also:
        Constant Field Values
      • TYPE_NAME

        public static final java.lang.String TYPE_NAME
        Key used to specify the name of a type.

        Since GraalVM for JDK 23 it will be called "type".

        See Also:
        Constant Field Values
      • FIELDS

        public static final java.lang.String FIELDS
        Key used to specify the list of fields available for reflection.
        See Also:
        Constant Field Values
      • METHODS

        public static final java.lang.String METHODS
        Key used to specify the list of methods available for reflection.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ReachabilityMetadata

        private ReachabilityMetadata()
    • Method Detail

      • writeReflectConfig

        public static void writeReflectConfig​(java.util.Collection<ReachabilityMetadata.Type> types,
                                              java.io.OutputStream output)
                                       throws java.io.IOException
        Writes the contents of a reflect-config.json file.
        Parameters:
        types - The reflection metadata for types.
        output - The object to use as output.
        Throws:
        java.io.IOException