GraalVM本机映像-H:ConfigurationFileDirectories文件的文档

时间:2019-11-13 22:30:58

标签: graalvm graalvm-native-image

可以在此处找到GraalVM native-image配置文件的文档/架构,该文件使用-H:ConfigurationFileDirectories=<dir>选项-jni-config.jsonreflect-config.jsonproxy-config.json和{ {1}}?

1 个答案:

答案 0 :(得分:1)

我认为可以找到here的架构。另外,您可以在一个更高级别的目录中找到所有必要的解析器。

如果要过时,我在这里复制架构:

One or several (comma-separated) paths to JSON files that specify which program elements should be made available via reflection.
The JSON object schema is:

    {
      String name; // fully qualified class name
      boolean allDeclaredConstructors; // include all declared constructors, see Class.getDeclaredConstructors()
      boolean allPublicConstructors;   // include all public constructors, see Class.getConstructors()
      boolean allDeclaredMethods; // include all declared methods, see Class.getDeclaredMethods()
      boolean allPublicMethods;   // include all public methods, see Class.getMethods()
      boolean allDeclaredFields;  // include all declared fields, see Class.getDeclaredFields()
      boolean allPublicFields;    // include all public fields, see Class.getFields()
      {
        String name; // method name
        String[] parameterTypes; // parameter types (optional, use if ambiguous)
      }[] methods;
      {
        String name; // field name
      }[] fields;
    }[];

Example:

    [
      {
        "name" : "java.lang.Class",
        "allDeclaredConstructors" : "true",
        "allPublicConstructors" : "true",
        "allDeclaredMethods" : "true",
        "allPublicMethods" : "true"
      },
      {
        "name" : "java.lang.String",
        "fields" : [
          { "name" : "value" },
          { "name" : "hash" }
        ],
        "methods" : [
          { "name" : "<init>", "parameterTypes" : [] },
          { "name" : "<init>", "parameterTypes" : ["char[]"] },
          { "name" : "charAt" },
          { "name" : "format", "parameterTypes" : ["java.lang.String", "java.lang.Object[]"] },
        ]
      },
      {
        "name" : "java.lang.String$CaseInsensitiveComparator",
        "methods" : [
          { "name" : "compare" }
        ]
      }
    ]