简体   繁体   English

GraalVM native-image -H:ConfigurationFileDirectories 文件的文档

[英]Documentation of GraalVM native-image -H:ConfigurationFileDirectories files

Where can be found a documentation / schema of GraalVM native-image configuration files that are set using -H:ConfigurationFileDirectories=<dir> option - jni-config.json , reflect-config.json , proxy-config.json and resource-config.json ?在哪里可以找到使用-H:ConfigurationFileDirectories=<dir>选项设置的 GraalVM native-image配置文件的文档/架构 - jni-config.jsonreflect-config.jsonproxy-config.jsonresource-config.json config.Z466DEEC76ECDF5FCA6ZD38 resource-config.json ?

I think the schema can be found here .我认为架构可以在这里找到。 Also, you can find all necessary parsers in one of the higher-level directories.此外,您可以在更高级别的目录之一中找到所有必要的解析器。

I'm copying the schema here in case it gets outdated:我在这里复制模式以防它过时:

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" }
        ]
      }
    ]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM