【问题标题】:Documentation of GraalVM native-image -H:ConfigurationFileDirectories filesGraalVM native-image -H:ConfigurationFileDirectories 文件的文档
【发布时间】:2019-11-13 22:30:58
【问题描述】:

在哪里可以找到使用 -H:ConfigurationFileDirectories=<dir> 选项设置的 GraalVM native-image 配置文件的文档/架构 - jni-config.jsonreflect-config.jsonproxy-config.jsonresource-config.json

【问题讨论】:

    标签: java graalvm graalvm-native-image


    【解决方案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" }
            ]
          }
        ]
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-05
      • 1970-01-01
      • 2020-07-22
      • 2020-12-07
      • 1970-01-01
      相关资源
      最近更新 更多