From 8188d9f7e50acd576c30a66ed6ca845d9081f277 Mon Sep 17 00:00:00 2001 From: Jack Conradson Date: Mon, 11 Dec 2017 16:37:35 -0800 Subject: [PATCH] Painless: Only allow Painless type names to be the same as the equivalent Java class. (#27264) Also adds a parameter called only_fqn to the whitelist to enforce that a painless type must be specified as the fully-qualifed java class name. --- docs/painless/painless-debugging.asciidoc | 2 +- .../elasticsearch/painless/Definition.java | 94 ++++++-- .../org/elasticsearch/painless/Whitelist.java | 12 +- .../painless/WhitelistLoader.java | 56 +++-- .../org/elasticsearch/painless/java.lang.txt | 106 ++++----- .../org/elasticsearch/painless/java.math.txt | 8 +- .../org/elasticsearch/painless/java.text.txt | 60 ++--- .../painless/java.time.chrono.txt | 42 ++-- .../painless/java.time.format.txt | 16 +- .../painless/java.time.temporal.txt | 32 +-- .../org/elasticsearch/painless/java.time.txt | 36 +-- .../elasticsearch/painless/java.time.zone.txt | 12 +- .../painless/java.util.function.txt | 86 +++---- .../painless/java.util.regex.txt | 4 +- .../painless/java.util.stream.txt | 24 +- .../org/elasticsearch/painless/java.util.txt | 216 +++++++++--------- .../org/elasticsearch/painless/joda.time.txt | 4 +- .../painless/org.elasticsearch.txt | 52 ++--- .../elasticsearch/painless/DebugTests.java | 6 +- .../elasticsearch/painless/RegexTests.java | 6 +- .../painless/node/NodeToStringTests.java | 5 +- 21 files changed, 474 insertions(+), 405 deletions(-) diff --git a/docs/painless/painless-debugging.asciidoc b/docs/painless/painless-debugging.asciidoc index e50090fe71d..a909593ff17 100644 --- a/docs/painless/painless-debugging.asciidoc +++ b/docs/painless/painless-debugging.asciidoc @@ -78,7 +78,7 @@ The response looks like: "caused_by": { "type": "script_exception", "to_string": "{gp=[26, 82, 1], last=gaudreau, assists=[17, 46, 0], first=johnny, goals=[9, 27, 1]}", - "painless_class": "LinkedHashMap", + "painless_class": "java.util.LinkedHashMap", "java_class": "java.util.LinkedHashMap", ... } diff --git a/modules/lang-painless/src/main/java/org/elasticsearch/painless/Definition.java b/modules/lang-painless/src/main/java/org/elasticsearch/painless/Definition.java index df56c599f03..43de306a7a8 100644 --- a/modules/lang-painless/src/main/java/org/elasticsearch/painless/Definition.java +++ b/modules/lang-painless/src/main/java/org/elasticsearch/painless/Definition.java @@ -33,6 +33,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Stack; +import java.util.regex.Pattern; /** * The entire API for Painless. Also used as a whitelist for checking for legal @@ -40,6 +41,8 @@ import java.util.Stack; */ public final class Definition { + private static final Pattern TYPE_NAME_PATTERN = Pattern.compile("^[_a-zA-Z][._a-zA-Z0-9]*$"); + private static final String[] DEFINITION_FILES = new String[] { "org.elasticsearch.txt", "java.lang.txt", @@ -535,7 +538,8 @@ public final class Definition { // are used for validation during the second iteration for (Whitelist whitelist : whitelists) { for (Whitelist.Struct whitelistStruct : whitelist.whitelistStructs) { - Struct painlessStruct = structsMap.get(whitelistStruct.painlessTypeName); + String painlessTypeName = whitelistStruct.javaClassName.replace('$', '.'); + Struct painlessStruct = structsMap.get(painlessTypeName); if (painlessStruct != null && painlessStruct.clazz.getName().equals(whitelistStruct.javaClassName) == false) { throw new IllegalArgumentException("struct [" + painlessStruct.name + "] cannot represent multiple classes " + @@ -545,7 +549,7 @@ public final class Definition { origin = whitelistStruct.origin; addStruct(whitelist.javaClassLoader, whitelistStruct); - painlessStruct = structsMap.get(whitelistStruct.painlessTypeName); + painlessStruct = structsMap.get(painlessTypeName); javaClassesToPainlessStructs.put(painlessStruct.clazz, painlessStruct); } } @@ -555,19 +559,21 @@ public final class Definition { // been white-listed during the first iteration for (Whitelist whitelist : whitelists) { for (Whitelist.Struct whitelistStruct : whitelist.whitelistStructs) { + String painlessTypeName = whitelistStruct.javaClassName.replace('$', '.'); + for (Whitelist.Constructor whitelistConstructor : whitelistStruct.whitelistConstructors) { origin = whitelistConstructor.origin; - addConstructor(whitelistStruct.painlessTypeName, whitelistConstructor); + addConstructor(painlessTypeName, whitelistConstructor); } for (Whitelist.Method whitelistMethod : whitelistStruct.whitelistMethods) { origin = whitelistMethod.origin; - addMethod(whitelist.javaClassLoader, whitelistStruct.painlessTypeName, whitelistMethod); + addMethod(whitelist.javaClassLoader, painlessTypeName, whitelistMethod); } for (Whitelist.Field whitelistField : whitelistStruct.whitelistFields) { origin = whitelistField.origin; - addField(whitelistStruct.painlessTypeName, whitelistField); + addField(painlessTypeName, whitelistField); } } } @@ -577,7 +583,14 @@ public final class Definition { // goes through each Painless struct and determines the inheritance list, // and then adds all inherited types to the Painless struct's whitelist - for (Struct painlessStruct : structsMap.values()) { + for (Map.Entry painlessNameStructEntry : structsMap.entrySet()) { + String painlessStructName = painlessNameStructEntry.getKey(); + Struct painlessStruct = painlessNameStructEntry.getValue(); + + if (painlessStruct.name.equals(painlessStructName) == false) { + continue; + } + List painlessSuperStructs = new ArrayList<>(); Class javaSuperClass = painlessStruct.clazz.getSuperclass(); @@ -633,16 +646,33 @@ public final class Definition { } // mark functional interfaces (or set null, to mark class is not) - for (Struct clazz : structsMap.values()) { - clazz.functionalMethod.set(computeFunctionalInterfaceMethod(clazz)); + for (String painlessStructName : structsMap.keySet()) { + Struct painlessStruct = structsMap.get(painlessStructName); + + if (painlessStruct.name.equals(painlessStructName) == false) { + continue; + } + + painlessStruct.functionalMethod.set(computeFunctionalInterfaceMethod(painlessStruct)); } // precompute runtime classes - for (Struct struct : structsMap.values()) { - addRuntimeClass(struct); + for (String painlessStructName : structsMap.keySet()) { + Struct painlessStruct = structsMap.get(painlessStructName); + + if (painlessStruct.name.equals(painlessStructName) == false) { + continue; + } + + addRuntimeClass(painlessStruct); } + // copy all structs to make them unmodifiable for outside users: - for (final Map.Entry entry : structsMap.entrySet()) { + for (Map.Entry entry : structsMap.entrySet()) { + if (entry.getKey().equals(entry.getValue().name) == false) { + continue; + } + entry.setValue(entry.getValue().freeze()); } @@ -678,8 +708,17 @@ public final class Definition { } private void addStruct(ClassLoader whitelistClassLoader, Whitelist.Struct whitelistStruct) { - if (!whitelistStruct.painlessTypeName.matches("^[_a-zA-Z][._a-zA-Z0-9]*")) { - throw new IllegalArgumentException("invalid struct type name [" + whitelistStruct.painlessTypeName + "]"); + String painlessTypeName = whitelistStruct.javaClassName.replace('$', '.'); + String importedPainlessTypeName = painlessTypeName; + + if (TYPE_NAME_PATTERN.matcher(painlessTypeName).matches() == false) { + throw new IllegalArgumentException("invalid struct type name [" + painlessTypeName + "]"); + } + + int index = whitelistStruct.javaClassName.lastIndexOf('.'); + + if (index != -1) { + importedPainlessTypeName = whitelistStruct.javaClassName.substring(index + 1).replace('$', '.'); } Class javaClass; @@ -698,21 +737,34 @@ public final class Definition { javaClass = Class.forName(whitelistStruct.javaClassName, true, whitelistClassLoader); } catch (ClassNotFoundException cnfe) { throw new IllegalArgumentException("invalid java class name [" + whitelistStruct.javaClassName + "]" + - " for struct [" + whitelistStruct.painlessTypeName + "]"); + " for struct [" + painlessTypeName + "]"); } } - Struct existingStruct = structsMap.get(whitelistStruct.painlessTypeName); + Struct existingStruct = structsMap.get(painlessTypeName); if (existingStruct == null) { - Struct struct = new Struct(whitelistStruct.painlessTypeName, javaClass, org.objectweb.asm.Type.getType(javaClass)); + Struct struct = new Struct(painlessTypeName, javaClass, org.objectweb.asm.Type.getType(javaClass)); + structsMap.put(painlessTypeName, struct); - structsMap.put(whitelistStruct.painlessTypeName, struct); - simpleTypesMap.put(whitelistStruct.painlessTypeName, getTypeInternal(whitelistStruct.painlessTypeName)); + if (whitelistStruct.onlyFQNJavaClassName) { + simpleTypesMap.put(painlessTypeName, getType(painlessTypeName)); + } else if (simpleTypesMap.containsKey(importedPainlessTypeName) == false) { + simpleTypesMap.put(importedPainlessTypeName, getType(painlessTypeName)); + structsMap.put(importedPainlessTypeName, struct); + } else { + throw new IllegalArgumentException("duplicate short name [" + importedPainlessTypeName + "] " + + "found for struct [" + painlessTypeName + "]"); + } } else if (existingStruct.clazz.equals(javaClass) == false) { - throw new IllegalArgumentException("struct [" + whitelistStruct.painlessTypeName + "] is used to " + + throw new IllegalArgumentException("struct [" + painlessTypeName + "] is used to " + "illegally represent multiple java classes [" + whitelistStruct.javaClassName + "] and " + "[" + existingStruct.clazz.getName() + "]"); + } else if (whitelistStruct.onlyFQNJavaClassName && simpleTypesMap.containsKey(importedPainlessTypeName) && + simpleTypesMap.get(importedPainlessTypeName).clazz == javaClass || + whitelistStruct.onlyFQNJavaClassName == false && (simpleTypesMap.containsKey(importedPainlessTypeName) == false || + simpleTypesMap.get(importedPainlessTypeName).clazz != javaClass)) { + throw new IllegalArgumentException("inconsistent only_fqn parameters found for type [" + painlessTypeName + "]"); } } @@ -783,7 +835,7 @@ public final class Definition { "name [" + whitelistMethod.javaMethodName + "] and parameters " + whitelistMethod.painlessParameterTypeNames); } - if (!whitelistMethod.javaMethodName.matches("^[_a-zA-Z][_a-zA-Z0-9]*$")) { + if (TYPE_NAME_PATTERN.matcher(whitelistMethod.javaMethodName).matches() == false) { throw new IllegalArgumentException("invalid method name" + " [" + whitelistMethod.javaMethodName + "] for owner struct [" + ownerStructName + "]."); } @@ -913,7 +965,7 @@ public final class Definition { "name [" + whitelistField.javaFieldName + "] and type " + whitelistField.painlessFieldTypeName); } - if (!whitelistField.javaFieldName.matches("^[_a-zA-Z][_a-zA-Z0-9]*$")) { + if (TYPE_NAME_PATTERN.matcher(whitelistField.javaFieldName).matches() == false) { throw new IllegalArgumentException("invalid field name " + "[" + whitelistField.painlessFieldTypeName + "] for owner struct [" + ownerStructName + "]."); } diff --git a/modules/lang-painless/src/main/java/org/elasticsearch/painless/Whitelist.java b/modules/lang-painless/src/main/java/org/elasticsearch/painless/Whitelist.java index 7fd3493d517..678b8a4c1ae 100644 --- a/modules/lang-painless/src/main/java/org/elasticsearch/painless/Whitelist.java +++ b/modules/lang-painless/src/main/java/org/elasticsearch/painless/Whitelist.java @@ -56,12 +56,14 @@ public final class Whitelist { /** Information about where this struct was white-listed from. Can be used for error messages. */ public final String origin; - /** The Painless name of this struct which will also be the name of a type in a Painless script. */ - public final String painlessTypeName; - /** The Java class name this struct represents. */ public final String javaClassName; + /** + * Allow the Java class name to only be specified as the fully-qualified name. + */ + public final boolean onlyFQNJavaClassName; + /** The {@link List} of white-listed ({@link Constructor}s) available to this struct. */ public final List whitelistConstructors; @@ -72,11 +74,11 @@ public final class Whitelist { public final List whitelistFields; /** Standard constructor. All values must be not {@code null}. */ - public Struct(String origin, String painlessTypeName, String javaClassName, + public Struct(String origin, String javaClassName, boolean onlyFQNJavaClassName, List whitelistConstructors, List whitelistMethods, List whitelistFields) { this.origin = Objects.requireNonNull(origin); - this.painlessTypeName = Objects.requireNonNull(painlessTypeName); this.javaClassName = Objects.requireNonNull(javaClassName); + this.onlyFQNJavaClassName = onlyFQNJavaClassName; this.whitelistConstructors = Collections.unmodifiableList(Objects.requireNonNull(whitelistConstructors)); this.whitelistMethods = Collections.unmodifiableList(Objects.requireNonNull(whitelistMethods)); diff --git a/modules/lang-painless/src/main/java/org/elasticsearch/painless/WhitelistLoader.java b/modules/lang-painless/src/main/java/org/elasticsearch/painless/WhitelistLoader.java index ad33d9c7ba5..93ea951f453 100644 --- a/modules/lang-painless/src/main/java/org/elasticsearch/painless/WhitelistLoader.java +++ b/modules/lang-painless/src/main/java/org/elasticsearch/painless/WhitelistLoader.java @@ -43,18 +43,29 @@ public final class WhitelistLoader { * and field. Most validation will be done at a later point after all white-lists have been gathered and their * merging takes place. * + * A painless type name is one of the following: + *
    + *
  • def - The Painless dynamic type which is automatically included without a need to be + * white-listed.
  • + *
  • fully-qualified Java type name - Any white-listed Java class will have the equivalent name as + * a Painless type name with the exception that any dollar symbols used as part of inner classes will + * be replaced with dot symbols.
  • + *
  • short Java type name - The text after the final dot symbol of any specified Java class. A + * short type Java name may be excluded by using the 'only_fqn' token during Painless struct parsing + * as described later.
  • + *
+ * * The following can be parsed from each white-list text file: *
    *
  • Blank lines will be ignored by the parser.
  • *
  • Comments may be created starting with a pound '#' symbol and end with a newline. These will * be ignored by the parser.
  • - *
  • Primitive types may be specified starting with 'class' and followed by the Painless type - * name (often the same as the Java type name), an arrow symbol, the Java type name, + *
  • Primitive types may be specified starting with 'class' and followed by the Java type name, * an opening bracket, a newline, a closing bracket, and a final newline.
  • - *
  • Complex types may be specified starting with 'class' and followed by the Painless type name, - * an arrow symbol, the Java class name, a opening bracket, a newline, constructor/method/field - * specifications, a closing bracket, and a final newline. Within a complex type the following - * may be parsed: + *
  • Complex types may be specified starting with 'class' and followed the fully-qualified Java + * class name, optionally followed by an 'only_fqn' token, an opening bracket, a newline, + * constructor/method/field specifications, a closing bracket, and a final newline. Within a complex + * type the following may be parsed: *
      *
    • A constructor may be specified starting with an opening parenthesis, followed by a * comma-delimited list of Painless type names corresponding to the type/class names for @@ -82,7 +93,9 @@ public final class WhitelistLoader { * If the same Painless type is defined across multiple files and the Java class is the same, all * specified constructors, methods, and fields will be merged into a single Painless type. The * Painless dynamic type, 'def', used as part of constructor, method, and field definitions will - * be appropriately parsed and handled. + * be appropriately parsed and handled. Painless complex types must be specified with the + * fully-qualified Java class name. Method argument types, method return types, and field types + * must be specified with Painless type names (def, fully-qualified, or short) as described earlier. * * The following example is used to create a single white-list text file: * @@ -94,7 +107,7 @@ public final class WhitelistLoader { * * # complex types * - * class Example -> my.package.Example { + * class my.package.Example only_fqn { * # constructors * () * (int) @@ -129,8 +142,8 @@ public final class WhitelistLoader { new InputStreamReader(resource.getResourceAsStream(filepath), StandardCharsets.UTF_8))) { String whitelistStructOrigin = null; - String painlessTypeName = null; String javaClassName = null; + boolean onlyFQNJavaClassName = false; List whitelistConstructors = null; List whitelistMethods = null; List whitelistFields = null; @@ -145,7 +158,7 @@ public final class WhitelistLoader { } // Handle a new struct by resetting all the variables necessary to construct a new Whitelist.Struct for the white-list. - // Expects the following format: 'class' ID -> ID '{' '\n' + // Expects the following format: 'class' ID 'only_fqn'? '{' '\n' if (line.startsWith("class ")) { // Ensure the final token of the line is '{'. if (line.endsWith("{") == false) { @@ -153,17 +166,18 @@ public final class WhitelistLoader { "invalid struct definition: failed to parse class opening bracket [" + line + "]"); } - // Parse the Painless type name and Java class name. - String[] tokens = line.substring(5, line.length() - 1).replaceAll("\\s+", "").split("->"); + // Parse the Java class name. + String[] tokens = line.substring(5, line.length() - 1).trim().split("\\s+"); // Ensure the correct number of tokens. - if (tokens.length != 2) { + if (tokens.length == 2 && "only_fqn".equals(tokens[1])) { + onlyFQNJavaClassName = true; + } else if (tokens.length != 1) { throw new IllegalArgumentException("invalid struct definition: failed to parse class name [" + line + "]"); } whitelistStructOrigin = "[" + filepath + "]:[" + number + "]"; - painlessTypeName = tokens[0]; - javaClassName = tokens[1]; + javaClassName = tokens[0]; // Reset all the constructors, methods, and fields to support a new struct. whitelistConstructors = new ArrayList<>(); @@ -174,17 +188,17 @@ public final class WhitelistLoader { // constructors, methods, augmented methods, and fields, and adding it to the list of white-listed structs. // Expects the following format: '}' '\n' } else if (line.equals("}")) { - if (painlessTypeName == null) { + if (javaClassName == null) { throw new IllegalArgumentException("invalid struct definition: extraneous closing bracket"); } - whitelistStructs.add(new Whitelist.Struct(whitelistStructOrigin, painlessTypeName, javaClassName, + whitelistStructs.add(new Whitelist.Struct(whitelistStructOrigin, javaClassName, onlyFQNJavaClassName, whitelistConstructors, whitelistMethods, whitelistFields)); // Set all the variables to null to ensure a new struct definition is found before other parsable values. whitelistStructOrigin = null; - painlessTypeName = null; javaClassName = null; + onlyFQNJavaClassName = false; whitelistConstructors = null; whitelistMethods = null; whitelistFields = null; @@ -195,7 +209,7 @@ public final class WhitelistLoader { String origin = "[" + filepath + "]:[" + number + "]"; // Ensure we have a defined struct before adding any constructors, methods, augmented methods, or fields. - if (painlessTypeName == null) { + if (javaClassName == null) { throw new IllegalArgumentException("invalid object definition: expected a class name [" + line + "]"); } @@ -229,7 +243,7 @@ public final class WhitelistLoader { // Parse the tokens prior to the method parameters. int parameterIndex = line.indexOf('('); - String[] tokens = line.substring(0, parameterIndex).split("\\s+"); + String[] tokens = line.trim().substring(0, parameterIndex).split("\\s+"); String javaMethodName; String javaAugmentedClassName; @@ -275,7 +289,7 @@ public final class WhitelistLoader { } // Ensure all structs end with a '}' token before the end of the file. - if (painlessTypeName != null) { + if (javaClassName != null) { throw new IllegalArgumentException("invalid struct definition: expected closing bracket"); } } catch (Exception exception) { diff --git a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.lang.txt b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.lang.txt index a5a414008d7..a793ef847f9 100644 --- a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.lang.txt +++ b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.lang.txt @@ -24,14 +24,14 @@ #### Interfaces -class Appendable -> java.lang.Appendable { +class java.lang.Appendable { # append(char/CharSequence): skipped. left to subclasses (e.g. StringBuilder). Appendable append(CharSequence,int,int) } # AutoCloseable: i/o -class CharSequence -> java.lang.CharSequence { +class java.lang.CharSequence { char charAt(int) IntStream chars() IntStream codePoints() @@ -44,11 +44,11 @@ class CharSequence -> java.lang.CharSequence { # Cloneable: add clone() to subclasses directly. -class Comparable -> java.lang.Comparable { +class java.lang.Comparable { int compareTo(def) } -class Iterable -> java.lang.Iterable { +class java.lang.Iterable { void forEach(Consumer) Iterator iterator() Spliterator spliterator() @@ -72,7 +72,7 @@ class Iterable -> java.lang.Iterable { #### Classes -class Boolean -> java.lang.Boolean { +class java.lang.Boolean { Boolean TRUE Boolean FALSE boolean booleanValue() @@ -87,7 +87,7 @@ class Boolean -> java.lang.Boolean { Boolean valueOf(boolean) } -class Byte -> java.lang.Byte { +class java.lang.Byte { int BYTES byte MAX_VALUE byte MIN_VALUE @@ -105,7 +105,7 @@ class Byte -> java.lang.Byte { Byte valueOf(String,int) } -class Character -> java.lang.Character { +class java.lang.Character { int BYTES byte COMBINING_SPACING_MARK byte CONNECTOR_PUNCTUATION @@ -226,10 +226,10 @@ class Character -> java.lang.Character { Character valueOf(char) } -class Character.Subset -> java.lang.Character$Subset { +class java.lang.Character$Subset { } -class Character.UnicodeBlock -> java.lang.Character$UnicodeBlock { +class java.lang.Character$UnicodeBlock { Character.UnicodeBlock AEGEAN_NUMBERS Character.UnicodeBlock ALCHEMICAL_SYMBOLS Character.UnicodeBlock ALPHABETIC_PRESENTATION_FORMS @@ -459,7 +459,7 @@ class Character.UnicodeBlock -> java.lang.Character$UnicodeBlock { # ClassValue: ... # Compiler: ... -class Double -> java.lang.Double { +class java.lang.Double { int BYTES int MAX_EXPONENT double MAX_VALUE @@ -490,13 +490,13 @@ class Double -> java.lang.Double { Double valueOf(double) } -class Enum -> java.lang.Enum { +class java.lang.Enum { int compareTo(Enum) String name() int ordinal() } -class Float -> java.lang.Float { +class java.lang.Float { int BYTES int MAX_EXPONENT float MAX_VALUE @@ -529,7 +529,7 @@ class Float -> java.lang.Float { # InheritableThreadLocal: threads -class Integer -> java.lang.Integer { +class java.lang.Integer { int BYTES int MAX_VALUE int MIN_VALUE @@ -569,7 +569,7 @@ class Integer -> java.lang.Integer { Integer valueOf(String,int) } -class Long -> java.lang.Long { +class java.lang.Long { int BYTES long MAX_VALUE long MIN_VALUE @@ -609,7 +609,7 @@ class Long -> java.lang.Long { Long valueOf(String,int) } -class Math -> java.lang.Math { +class java.lang.Math { double E double PI double abs(double) @@ -651,7 +651,7 @@ class Math -> java.lang.Math { double ulp(double) } -class Number -> java.lang.Number { +class java.lang.Number { byte byteValue() short shortValue() int intValue() @@ -660,7 +660,7 @@ class Number -> java.lang.Number { double doubleValue() } -class Object -> java.lang.Object { +class java.lang.Object { boolean equals(Object) int hashCode() String toString() @@ -674,7 +674,7 @@ class Object -> java.lang.Object { # RuntimePermission: skipped # SecurityManger: skipped -class Short -> java.lang.Short { +class java.lang.Short { int BYTES short MAX_VALUE short MIN_VALUE @@ -693,7 +693,7 @@ class Short -> java.lang.Short { Short valueOf(String,int) } -class StackTraceElement -> java.lang.StackTraceElement { +class java.lang.StackTraceElement { (String,String,String,int) String getClassName() String getFileName() @@ -702,7 +702,7 @@ class StackTraceElement -> java.lang.StackTraceElement { boolean isNativeMethod() } -class StrictMath -> java.lang.StrictMath { +class java.lang.StrictMath { double E double PI double abs(double) @@ -744,7 +744,7 @@ class StrictMath -> java.lang.StrictMath { double ulp(double) } -class String -> java.lang.String { +class java.lang.String { () int codePointAt(int) int codePointBefore(int) @@ -786,7 +786,7 @@ class String -> java.lang.String { String valueOf(def) } -class StringBuffer -> java.lang.StringBuffer { +class java.lang.StringBuffer { () (CharSequence) StringBuffer append(def) @@ -813,7 +813,7 @@ class StringBuffer -> java.lang.StringBuffer { String substring(int,int) } -class StringBuilder -> java.lang.StringBuilder { +class java.lang.StringBuilder { () (CharSequence) StringBuilder append(def) @@ -840,7 +840,7 @@ class StringBuilder -> java.lang.StringBuilder { String substring(int,int) } -class System -> java.lang.System { +class java.lang.System { void arraycopy(Object,int,Object,int,int) long currentTimeMillis() long nanoTime() @@ -851,12 +851,12 @@ class System -> java.lang.System { # ThreadLocal: skipped # Throwable: skipped (reserved for painless, users can only catch Exceptions) -class Void -> java.lang.Void { +class java.lang.Void { } #### Enums -class Character.UnicodeScript -> java.lang.Character$UnicodeScript { +class java.lang.Character$UnicodeScript { Character.UnicodeScript ARABIC Character.UnicodeScript ARMENIAN Character.UnicodeScript AVESTAN @@ -968,41 +968,41 @@ class Character.UnicodeScript -> java.lang.Character$UnicodeScript { #### Exceptions -class ArithmeticException -> java.lang.ArithmeticException { +class java.lang.ArithmeticException { () (String) } -class ArrayIndexOutOfBoundsException -> java.lang.ArrayIndexOutOfBoundsException { +class java.lang.ArrayIndexOutOfBoundsException { () (String) } -class ArrayStoreException -> java.lang.ArrayStoreException { +class java.lang.ArrayStoreException { () (String) } -class ClassCastException -> java.lang.ClassCastException { +class java.lang.ClassCastException { () (String) } -class ClassNotFoundException -> java.lang.ClassNotFoundException { +class java.lang.ClassNotFoundException { () (String) } -class CloneNotSupportedException -> java.lang.CloneNotSupportedException { +class java.lang.CloneNotSupportedException { () (String) } -class EnumConstantNotPresentException -> java.lang.EnumConstantNotPresentException { +class java.lang.EnumConstantNotPresentException { String constantName() } -class Exception -> java.lang.Exception { +class java.lang.Exception { () (String) String getLocalizedMessage() @@ -1010,96 +1010,96 @@ class Exception -> java.lang.Exception { StackTraceElement[] getStackTrace() } -class IllegalAccessException -> java.lang.IllegalAccessException { +class java.lang.IllegalAccessException { () (String) } -class IllegalArgumentException -> java.lang.IllegalArgumentException { +class java.lang.IllegalArgumentException { () (String) } -class IllegalMonitorStateException -> java.lang.IllegalMonitorStateException { +class java.lang.IllegalMonitorStateException { () (String) } -class IllegalStateException -> java.lang.IllegalStateException { +class java.lang.IllegalStateException { () (String) } -class IllegalThreadStateException -> java.lang.IllegalThreadStateException { +class java.lang.IllegalThreadStateException { () (String) } -class IndexOutOfBoundsException -> java.lang.IndexOutOfBoundsException { +class java.lang.IndexOutOfBoundsException { () (String) } -class InstantiationException -> java.lang.InstantiationException { +class java.lang.InstantiationException { () (String) } -class InterruptedException -> java.lang.InterruptedException { +class java.lang.InterruptedException { () (String) } -class NegativeArraySizeException -> java.lang.NegativeArraySizeException { +class java.lang.NegativeArraySizeException { () (String) } -class NoSuchFieldException -> java.lang.NoSuchFieldException { +class java.lang.NoSuchFieldException { () (String) } -class NoSuchMethodException -> java.lang.NoSuchMethodException { +class java.lang.NoSuchMethodException { () (String) } -class NullPointerException -> java.lang.NullPointerException { +class java.lang.NullPointerException { () (String) } -class NumberFormatException -> java.lang.NumberFormatException { +class java.lang.NumberFormatException { () (String) } -class ReflectiveOperationException -> java.lang.ReflectiveOperationException { +class java.lang.ReflectiveOperationException { () (String) } -class RuntimeException -> java.lang.RuntimeException { +class java.lang.RuntimeException { () (String) } -class SecurityException -> java.lang.SecurityException { +class java.lang.SecurityException { () (String) } -class StringIndexOutOfBoundsException -> java.lang.StringIndexOutOfBoundsException { +class java.lang.StringIndexOutOfBoundsException { () (String) } -class TypeNotPresentException -> java.lang.TypeNotPresentException { +class java.lang.TypeNotPresentException { String typeName() } -class UnsupportedOperationException -> java.lang.UnsupportedOperationException { +class java.lang.UnsupportedOperationException { () (String) } diff --git a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.math.txt b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.math.txt index e7457628203..e66c6d8c91f 100644 --- a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.math.txt +++ b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.math.txt @@ -24,7 +24,7 @@ #### Classes -class BigDecimal -> java.math.BigDecimal { +class java.math.BigDecimal { BigDecimal ONE BigDecimal TEN BigDecimal ZERO @@ -77,7 +77,7 @@ class BigDecimal -> java.math.BigDecimal { BigDecimal valueOf(double) } -class BigInteger -> java.math.BigInteger { +class java.math.BigInteger { BigInteger ONE BigInteger TEN BigInteger ZERO @@ -123,7 +123,7 @@ class BigInteger -> java.math.BigInteger { BigInteger xor(BigInteger) } -class MathContext -> java.math.MathContext { +class java.math.MathContext { MathContext DECIMAL128 MathContext DECIMAL32 MathContext DECIMAL64 @@ -136,7 +136,7 @@ class MathContext -> java.math.MathContext { #### Enums -class RoundingMode -> java.math.RoundingMode { +class java.math.RoundingMode { RoundingMode CEILING RoundingMode DOWN RoundingMode FLOOR diff --git a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.text.txt b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.text.txt index fa9170cb5d2..2b159123953 100644 --- a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.text.txt +++ b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.text.txt @@ -24,7 +24,7 @@ #### Interfaces -class AttributedCharacterIterator -> java.text.AttributedCharacterIterator { +class java.text.AttributedCharacterIterator { Set getAllAttributeKeys() def getAttribute(AttributedCharacterIterator.Attribute) Map getAttributes() @@ -34,7 +34,7 @@ class AttributedCharacterIterator -> java.text.AttributedCharacterIterator { int getRunStart(Set) } -class CharacterIterator -> java.text.CharacterIterator { +class java.text.CharacterIterator { char DONE def clone() char current() @@ -50,18 +50,18 @@ class CharacterIterator -> java.text.CharacterIterator { #### Classes -class Annotation -> java.text.Annotation { +class java.text.Annotation { (Object) def getValue() } -class AttributedCharacterIterator.Attribute -> java.text.AttributedCharacterIterator$Attribute { +class java.text.AttributedCharacterIterator$Attribute { AttributedCharacterIterator.Attribute INPUT_METHOD_SEGMENT AttributedCharacterIterator.Attribute LANGUAGE AttributedCharacterIterator.Attribute READING } -class AttributedString -> java.text.AttributedString { +class java.text.AttributedString { (String) (String,Map) void addAttribute(AttributedCharacterIterator.Attribute,Object) @@ -72,7 +72,7 @@ class AttributedString -> java.text.AttributedString { AttributedCharacterIterator getIterator(AttributedCharacterIterator.Attribute[],int,int) } -class Bidi -> java.text.Bidi { +class java.text.Bidi { int DIRECTION_DEFAULT_LEFT_TO_RIGHT int DIRECTION_DEFAULT_RIGHT_TO_LEFT int DIRECTION_LEFT_TO_RIGHT @@ -96,7 +96,7 @@ class Bidi -> java.text.Bidi { boolean requiresBidi(char[],int,int) } -class BreakIterator -> java.text.BreakIterator { +class java.text.BreakIterator { int DONE def clone() int current() @@ -121,7 +121,7 @@ class BreakIterator -> java.text.BreakIterator { void setText(String) } -class ChoiceFormat -> java.text.ChoiceFormat { +class java.text.ChoiceFormat { (double[],String[]) (String) void applyPattern(String) @@ -134,7 +134,7 @@ class ChoiceFormat -> java.text.ChoiceFormat { String toPattern() } -class CollationElementIterator -> java.text.CollationElementIterator { +class java.text.CollationElementIterator { int NULLORDER int getMaxExpansion(int) int getOffset() @@ -148,13 +148,13 @@ class CollationElementIterator -> java.text.CollationElementIterator { short tertiaryOrder(int) } -class CollationKey -> java.text.CollationKey { +class java.text.CollationKey { int compareTo(CollationKey) String getSourceString() byte[] toByteArray() } -class Collator -> java.text.Collator { +class java.text.Collator { int CANONICAL_DECOMPOSITION int FULL_DECOMPOSITION int IDENTICAL @@ -174,7 +174,7 @@ class Collator -> java.text.Collator { void setStrength(int) } -class DateFormat -> java.text.DateFormat { +class java.text.DateFormat { int AM_PM_FIELD int DATE_FIELD int DAY_OF_WEEK_FIELD @@ -221,7 +221,7 @@ class DateFormat -> java.text.DateFormat { void setTimeZone(TimeZone) } -class DateFormat.Field -> java.text.DateFormat$Field { +class java.text.DateFormat$Field { DateFormat.Field AM_PM DateFormat.Field DAY_OF_MONTH DateFormat.Field DAY_OF_WEEK @@ -244,7 +244,7 @@ class DateFormat.Field -> java.text.DateFormat$Field { DateFormat.Field ofCalendarField(int) } -class DateFormatSymbols -> java.text.DateFormatSymbols { +class java.text.DateFormatSymbols { () (Locale) def clone() @@ -270,7 +270,7 @@ class DateFormatSymbols -> java.text.DateFormatSymbols { void setZoneStrings(String[][]) } -class DecimalFormat -> java.text.DecimalFormat { +class java.text.DecimalFormat { () (String) (String,DecimalFormatSymbols) @@ -298,7 +298,7 @@ class DecimalFormat -> java.text.DecimalFormat { String toPattern() } -class DecimalFormatSymbols -> java.text.DecimalFormatSymbols { +class java.text.DecimalFormatSymbols { () (Locale) def clone() @@ -337,7 +337,7 @@ class DecimalFormatSymbols -> java.text.DecimalFormatSymbols { void setZeroDigit(char) } -class FieldPosition -> java.text.FieldPosition { +class java.text.FieldPosition { (int) (Format.Field,int) int getBeginIndex() @@ -348,7 +348,7 @@ class FieldPosition -> java.text.FieldPosition { void setEndIndex(int) } -class Format -> java.text.Format { +class java.text.Format { def clone() String format(Object) StringBuffer format(Object,StringBuffer,FieldPosition) @@ -357,10 +357,10 @@ class Format -> java.text.Format { Object parseObject(String,ParsePosition) } -class Format.Field -> java.text.Format$Field { +class java.text.Format$Field { } -class MessageFormat -> java.text.MessageFormat { +class java.text.MessageFormat { void applyPattern(String) String format(String,Object[]) Format[] getFormats() @@ -376,16 +376,16 @@ class MessageFormat -> java.text.MessageFormat { String toPattern() } -class MessageFormat.Field -> java.text.MessageFormat$Field { +class java.text.MessageFormat$Field { MessageFormat.Field ARGUMENT } -class Normalizer -> java.text.Normalizer { +class java.text.Normalizer { boolean isNormalized(CharSequence,Normalizer.Form) String normalize(CharSequence,Normalizer.Form) } -class NumberFormat -> java.text.NumberFormat { +class java.text.NumberFormat { int FRACTION_FIELD int INTEGER_FIELD Locale[] getAvailableLocales() @@ -419,7 +419,7 @@ class NumberFormat -> java.text.NumberFormat { void setRoundingMode(RoundingMode) } -class NumberFormat.Field -> java.text.NumberFormat$Field { +class java.text.NumberFormat$Field { NumberFormat.Field CURRENCY NumberFormat.Field DECIMAL_SEPARATOR NumberFormat.Field EXPONENT @@ -433,7 +433,7 @@ class NumberFormat.Field -> java.text.NumberFormat$Field { NumberFormat.Field SIGN } -class ParsePosition -> java.text.ParsePosition { +class java.text.ParsePosition { (int) int getErrorIndex() int getIndex() @@ -441,13 +441,13 @@ class ParsePosition -> java.text.ParsePosition { void setIndex(int) } -class RuleBasedCollator -> java.text.RuleBasedCollator { +class java.text.RuleBasedCollator { (String) CollationElementIterator getCollationElementIterator(String) String getRules() } -class SimpleDateFormat -> java.text.SimpleDateFormat { +class java.text.SimpleDateFormat { () (String) (String,Locale) @@ -461,7 +461,7 @@ class SimpleDateFormat -> java.text.SimpleDateFormat { String toPattern() } -class StringCharacterIterator -> java.text.StringCharacterIterator { +class java.text.StringCharacterIterator { (String) (String,int) (String,int,int,int) @@ -470,7 +470,7 @@ class StringCharacterIterator -> java.text.StringCharacterIterator { #### Enums -class Normalizer.Form -> java.text.Normalizer$Form { +class java.text.Normalizer$Form { Normalizer.Form NFC Normalizer.Form NFD Normalizer.Form NFKC @@ -481,7 +481,7 @@ class Normalizer.Form -> java.text.Normalizer$Form { #### Exceptions -class ParseException -> java.text.ParseException { +class java.text.ParseException { (String,int) int getErrorOffset() } diff --git a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.time.chrono.txt b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.time.chrono.txt index 2d932a3ed1a..25740ff9d3b 100644 --- a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.time.chrono.txt +++ b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.time.chrono.txt @@ -24,7 +24,7 @@ #### Interfaces -class ChronoLocalDate -> java.time.chrono.ChronoLocalDate { +class java.time.chrono.ChronoLocalDate { ChronoLocalDateTime atTime(LocalTime) int compareTo(ChronoLocalDate) boolean equals(Object) @@ -51,7 +51,7 @@ class ChronoLocalDate -> java.time.chrono.ChronoLocalDate { ChronoLocalDate with(TemporalField,long) } -class ChronoLocalDateTime -> java.time.chrono.ChronoLocalDateTime { +class java.time.chrono.ChronoLocalDateTime { ChronoZonedDateTime atZone(ZoneId) int compareTo(ChronoLocalDateTime) boolean equals(Object) @@ -76,7 +76,7 @@ class ChronoLocalDateTime -> java.time.chrono.ChronoLocalDateTime { ChronoLocalDateTime with(TemporalField,long) } -class Chronology -> java.time.chrono.Chronology { +class java.time.chrono.Chronology { int compareTo(Chronology) ChronoLocalDate date(TemporalAccessor) ChronoLocalDate date(Era,int,int,int) @@ -106,7 +106,7 @@ class Chronology -> java.time.chrono.Chronology { ChronoZonedDateTime zonedDateTime(Instant,ZoneId) } -class ChronoPeriod -> java.time.chrono.ChronoPeriod { +class java.time.chrono.ChronoPeriod { ChronoPeriod between(ChronoLocalDate,ChronoLocalDate) boolean equals(Object) Chronology getChronology() @@ -122,7 +122,7 @@ class ChronoPeriod -> java.time.chrono.ChronoPeriod { String toString() } -class ChronoZonedDateTime -> java.time.chrono.ChronoZonedDateTime { +class java.time.chrono.ChronoZonedDateTime { int compareTo(ChronoZonedDateTime) boolean equals(Object) String format(DateTimeFormatter) @@ -153,17 +153,17 @@ class ChronoZonedDateTime -> java.time.chrono.ChronoZonedDateTime { ChronoZonedDateTime withZoneSameInstant(ZoneId) } -class Era -> java.time.chrono.Era { +class java.time.chrono.Era { String getDisplayName(TextStyle,Locale) int getValue() } #### Classes -class AbstractChronology -> java.time.chrono.AbstractChronology { +class java.time.chrono.AbstractChronology { } -class HijrahChronology -> java.time.chrono.HijrahChronology { +class java.time.chrono.HijrahChronology { HijrahChronology INSTANCE HijrahDate date(TemporalAccessor) HijrahDate date(int,int,int) @@ -175,7 +175,7 @@ class HijrahChronology -> java.time.chrono.HijrahChronology { HijrahDate resolveDate(Map,ResolverStyle) } -class HijrahDate -> java.time.chrono.HijrahDate { +class java.time.chrono.HijrahDate { HijrahDate from(TemporalAccessor) HijrahChronology getChronology() HijrahEra getEra() @@ -189,7 +189,7 @@ class HijrahDate -> java.time.chrono.HijrahDate { HijrahDate withVariant(HijrahChronology) } -class IsoChronology -> java.time.chrono.IsoChronology { +class java.time.chrono.IsoChronology { IsoChronology INSTANCE LocalDate date(TemporalAccessor) LocalDate date(int,int,int) @@ -205,7 +205,7 @@ class IsoChronology -> java.time.chrono.IsoChronology { ZonedDateTime zonedDateTime(Instant,ZoneId) } -class JapaneseChronology -> java.time.chrono.JapaneseChronology { +class java.time.chrono.JapaneseChronology { JapaneseChronology INSTANCE JapaneseDate date(TemporalAccessor) JapaneseDate date(int,int,int) @@ -217,7 +217,7 @@ class JapaneseChronology -> java.time.chrono.JapaneseChronology { JapaneseDate resolveDate(Map,ResolverStyle) } -class JapaneseDate -> java.time.chrono.JapaneseDate { +class java.time.chrono.JapaneseDate { JapaneseDate of(int,int,int) JapaneseDate from(TemporalAccessor) JapaneseChronology getChronology() @@ -230,7 +230,7 @@ class JapaneseDate -> java.time.chrono.JapaneseDate { JapaneseDate minus(long,TemporalUnit) } -class JapaneseEra -> java.time.chrono.JapaneseEra { +class java.time.chrono.JapaneseEra { JapaneseEra HEISEI JapaneseEra MEIJI JapaneseEra SHOWA @@ -241,7 +241,7 @@ class JapaneseEra -> java.time.chrono.JapaneseEra { JapaneseEra[] values() } -class MinguoChronology -> java.time.chrono.MinguoChronology { +class java.time.chrono.MinguoChronology { MinguoChronology INSTANCE MinguoDate date(TemporalAccessor) MinguoDate date(int,int,int) @@ -253,7 +253,7 @@ class MinguoChronology -> java.time.chrono.MinguoChronology { MinguoDate resolveDate(Map,ResolverStyle) } -class MinguoDate -> java.time.chrono.MinguoDate { +class java.time.chrono.MinguoDate { MinguoDate of(int,int,int) MinguoDate from(TemporalAccessor) MinguoChronology getChronology() @@ -266,7 +266,7 @@ class MinguoDate -> java.time.chrono.MinguoDate { MinguoDate minus(long,TemporalUnit) } -class ThaiBuddhistChronology -> java.time.chrono.ThaiBuddhistChronology { +class java.time.chrono.ThaiBuddhistChronology { ThaiBuddhistChronology INSTANCE ThaiBuddhistDate date(TemporalAccessor) ThaiBuddhistDate date(int,int,int) @@ -278,7 +278,7 @@ class ThaiBuddhistChronology -> java.time.chrono.ThaiBuddhistChronology { ThaiBuddhistDate resolveDate(Map,ResolverStyle) } -class ThaiBuddhistDate -> java.time.chrono.ThaiBuddhistDate { +class java.time.chrono.ThaiBuddhistDate { ThaiBuddhistDate of(int,int,int) ThaiBuddhistDate from(TemporalAccessor) ThaiBuddhistChronology getChronology() @@ -293,7 +293,7 @@ class ThaiBuddhistDate -> java.time.chrono.ThaiBuddhistDate { #### Enums -class HijrahEra -> java.time.chrono.HijrahEra { +class java.time.chrono.HijrahEra { HijrahEra AH int getValue() HijrahEra of(int) @@ -301,7 +301,7 @@ class HijrahEra -> java.time.chrono.HijrahEra { HijrahEra[] values() } -class IsoEra -> java.time.chrono.IsoEra { +class java.time.chrono.IsoEra { IsoEra BCE IsoEra CE int getValue() @@ -310,7 +310,7 @@ class IsoEra -> java.time.chrono.IsoEra { IsoEra[] values() } -class MinguoEra -> java.time.chrono.MinguoEra { +class java.time.chrono.MinguoEra { MinguoEra BEFORE_ROC MinguoEra ROC int getValue() @@ -319,7 +319,7 @@ class MinguoEra -> java.time.chrono.MinguoEra { MinguoEra[] values() } -class ThaiBuddhistEra -> java.time.chrono.ThaiBuddhistEra { +class java.time.chrono.ThaiBuddhistEra { ThaiBuddhistEra BE ThaiBuddhistEra BEFORE_BE int getValue() diff --git a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.time.format.txt b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.time.format.txt index d5b5c9cc355..59f484454a7 100644 --- a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.time.format.txt +++ b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.time.format.txt @@ -24,7 +24,7 @@ #### Classes -class DateTimeFormatter -> java.time.format.DateTimeFormatter { +class java.time.format.DateTimeFormatter { DateTimeFormatter BASIC_ISO_DATE DateTimeFormatter ISO_DATE DateTimeFormatter ISO_DATE_TIME @@ -70,7 +70,7 @@ class DateTimeFormatter -> java.time.format.DateTimeFormatter { DateTimeFormatter withZone(ZoneId) } -class DateTimeFormatterBuilder -> java.time.format.DateTimeFormatterBuilder { +class java.time.format.DateTimeFormatterBuilder { () DateTimeFormatterBuilder append(DateTimeFormatter) DateTimeFormatterBuilder appendChronologyId() @@ -110,7 +110,7 @@ class DateTimeFormatterBuilder -> java.time.format.DateTimeFormatterBuilder { DateTimeFormatter toFormatter(Locale) } -class DecimalStyle -> java.time.format.DecimalStyle { +class java.time.format.DecimalStyle { DecimalStyle STANDARD Set getAvailableLocales() char getDecimalSeparator() @@ -127,7 +127,7 @@ class DecimalStyle -> java.time.format.DecimalStyle { #### Enums -class FormatStyle -> java.time.format.FormatStyle { +class java.time.format.FormatStyle { FormatStyle FULL FormatStyle LONG FormatStyle MEDIUM @@ -136,7 +136,7 @@ class FormatStyle -> java.time.format.FormatStyle { FormatStyle[] values() } -class ResolverStyle -> java.time.format.ResolverStyle { +class java.time.format.ResolverStyle { ResolverStyle LENIENT ResolverStyle SMART ResolverStyle STRICT @@ -144,7 +144,7 @@ class ResolverStyle -> java.time.format.ResolverStyle { ResolverStyle[] values() } -class SignStyle -> java.time.format.SignStyle { +class java.time.format.SignStyle { SignStyle ALWAYS SignStyle EXCEEDS_PAD SignStyle NEVER @@ -154,7 +154,7 @@ class SignStyle -> java.time.format.SignStyle { SignStyle[] values() } -class TextStyle -> java.time.format.TextStyle { +class java.time.format.TextStyle { TextStyle FULL TextStyle FULL_STANDALONE TextStyle NARROW @@ -170,7 +170,7 @@ class TextStyle -> java.time.format.TextStyle { #### Exceptions -class DateTimeParseException -> java.time.format.DateTimeParseException { +class java.time.format.DateTimeParseException { (String,CharSequence,int) int getErrorIndex() String getParsedString() diff --git a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.time.temporal.txt b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.time.temporal.txt index e3c09bc6255..3ef2d33accc 100644 --- a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.time.temporal.txt +++ b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.time.temporal.txt @@ -24,7 +24,7 @@ #### Interfaces -class Temporal -> java.time.temporal.Temporal { +class java.time.temporal.Temporal { Temporal minus(long,TemporalUnit) Temporal minus(TemporalAmount) Temporal plus(long,TemporalUnit) @@ -34,7 +34,7 @@ class Temporal -> java.time.temporal.Temporal { Temporal with(TemporalField,long) } -class TemporalAccessor -> java.time.temporal.TemporalAccessor { +class java.time.temporal.TemporalAccessor { int get(TemporalField) long getLong(TemporalField) boolean isSupported(TemporalField) @@ -42,18 +42,18 @@ class TemporalAccessor -> java.time.temporal.TemporalAccessor { ValueRange range(TemporalField) } -class TemporalAdjuster -> java.time.temporal.TemporalAdjuster { +class java.time.temporal.TemporalAdjuster { Temporal adjustInto(Temporal) } -class TemporalAmount -> java.time.temporal.TemporalAmount { +class java.time.temporal.TemporalAmount { Temporal addTo(Temporal) long get(TemporalUnit) List getUnits() Temporal subtractFrom(Temporal) } -class TemporalField -> java.time.temporal.TemporalField { +class java.time.temporal.TemporalField { Temporal adjustInto(Temporal,long) TemporalUnit getBaseUnit() String getDisplayName(Locale) @@ -68,11 +68,11 @@ class TemporalField -> java.time.temporal.TemporalField { String toString() } -class TemporalQuery -> java.time.temporal.TemporalQuery { +class java.time.temporal.TemporalQuery { def queryFrom(TemporalAccessor) } -class TemporalUnit -> java.time.temporal.TemporalUnit { +class java.time.temporal.TemporalUnit { Temporal addTo(Temporal,long) long between(Temporal,Temporal) Duration getDuration() @@ -85,7 +85,7 @@ class TemporalUnit -> java.time.temporal.TemporalUnit { #### Classes -class IsoFields -> java.time.temporal.IsoFields { +class java.time.temporal.IsoFields { TemporalField DAY_OF_QUARTER TemporalField QUARTER_OF_YEAR TemporalUnit QUARTER_YEARS @@ -94,13 +94,13 @@ class IsoFields -> java.time.temporal.IsoFields { TemporalField WEEK_OF_WEEK_BASED_YEAR } -class JulianFields -> java.time.temporal.JulianFields { +class java.time.temporal.JulianFields { TemporalField JULIAN_DAY TemporalField MODIFIED_JULIAN_DAY TemporalField RATA_DIE } -class TemporalAdjusters -> java.time.temporal.TemporalAdjusters { +class java.time.temporal.TemporalAdjusters { TemporalAdjuster dayOfWeekInMonth(int,DayOfWeek) TemporalAdjuster firstDayOfMonth() TemporalAdjuster firstDayOfNextMonth() @@ -117,7 +117,7 @@ class TemporalAdjusters -> java.time.temporal.TemporalAdjusters { TemporalAdjuster previousOrSame(DayOfWeek) } -class TemporalQueries -> java.time.temporal.TemporalQueries { +class java.time.temporal.TemporalQueries { TemporalQuery chronology() TemporalQuery localDate() TemporalQuery localTime() @@ -127,7 +127,7 @@ class TemporalQueries -> java.time.temporal.TemporalQueries { TemporalQuery zoneId() } -class ValueRange -> java.time.temporal.ValueRange { +class java.time.temporal.ValueRange { int checkValidIntValue(long,TemporalField) long checkValidValue(long,TemporalField) long getLargestMinimum() @@ -143,7 +143,7 @@ class ValueRange -> java.time.temporal.ValueRange { ValueRange of(long,long,long,long) } -class WeekFields -> java.time.temporal.WeekFields { +class java.time.temporal.WeekFields { WeekFields ISO WeekFields SUNDAY_START TemporalUnit WEEK_BASED_YEARS @@ -160,7 +160,7 @@ class WeekFields -> java.time.temporal.WeekFields { #### Enums -class ChronoField -> java.time.temporal.ChronoField { +class java.time.temporal.ChronoField { ChronoField ALIGNED_DAY_OF_WEEK_IN_MONTH ChronoField ALIGNED_DAY_OF_WEEK_IN_YEAR ChronoField ALIGNED_WEEK_OF_MONTH @@ -197,7 +197,7 @@ class ChronoField -> java.time.temporal.ChronoField { ChronoField[] values() } -class ChronoUnit -> java.time.temporal.ChronoUnit { +class java.time.temporal.ChronoUnit { ChronoUnit CENTURIES ChronoUnit DAYS ChronoUnit DECADES @@ -220,6 +220,6 @@ class ChronoUnit -> java.time.temporal.ChronoUnit { #### Exceptions -class UnsupportedTemporalTypeException -> java.time.temporal.UnsupportedTemporalTypeException { +class java.time.temporal.UnsupportedTemporalTypeException { (String) } diff --git a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.time.txt b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.time.txt index 1c012042b02..0cedc849a68 100644 --- a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.time.txt +++ b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.time.txt @@ -24,7 +24,7 @@ #### Classes -class Clock -> java.time.Clock { +class java.time.Clock { Clock fixed(Instant,ZoneId) ZoneId getZone() Instant instant() @@ -33,7 +33,7 @@ class Clock -> java.time.Clock { Clock tick(Clock,Duration) } -class Duration -> java.time.Duration { +class java.time.Duration { Duration ZERO Duration abs() Duration between(Temporal,Temporal) @@ -80,7 +80,7 @@ class Duration -> java.time.Duration { Duration withNanos(int) } -class Instant -> java.time.Instant { +class java.time.Instant { Instant EPOCH Instant MAX Instant MIN @@ -112,7 +112,7 @@ class Instant -> java.time.Instant { Instant with(TemporalField,long) } -class LocalDate -> java.time.LocalDate { +class java.time.LocalDate { LocalDate MAX LocalDate MIN LocalDateTime atStartOfDay() @@ -155,7 +155,7 @@ class LocalDate -> java.time.LocalDate { LocalDate withYear(int) } -class LocalDateTime -> java.time.LocalDateTime { +class java.time.LocalDateTime { LocalDateTime MIN LocalDateTime MAX OffsetDateTime atOffset(ZoneOffset) @@ -212,7 +212,7 @@ class LocalDateTime -> java.time.LocalDateTime { LocalDateTime withYear(int) } -class LocalTime -> java.time.LocalTime { +class java.time.LocalTime { LocalTime MAX LocalTime MIDNIGHT LocalTime MIN @@ -258,7 +258,7 @@ class LocalTime -> java.time.LocalTime { LocalTime withSecond(int) } -class MonthDay -> java.time.MonthDay { +class java.time.MonthDay { LocalDate atYear(int) int compareTo(MonthDay) String format(DateTimeFormatter) @@ -277,7 +277,7 @@ class MonthDay -> java.time.MonthDay { MonthDay withMonth(int) } -class OffsetDateTime -> java.time.OffsetDateTime { +class java.time.OffsetDateTime { OffsetDateTime MAX OffsetDateTime MIN ZonedDateTime atZoneSameInstant(ZoneId) @@ -348,7 +348,7 @@ class OffsetDateTime -> java.time.OffsetDateTime { OffsetDateTime withOffsetSameInstant(ZoneOffset) } -class OffsetTime -> java.time.OffsetTime { +class java.time.OffsetTime { OffsetTime MAX OffsetTime MIN int compareTo(OffsetTime) @@ -391,7 +391,7 @@ class OffsetTime -> java.time.OffsetTime { OffsetTime withSecond(int) } -class Period -> java.time.Period { +class java.time.Period { Period ZERO Period between(LocalDate,LocalDate) Period from(TemporalAmount) @@ -422,7 +422,7 @@ class Period -> java.time.Period { Period withYears(int) } -class Year -> java.time.Year { +class java.time.Year { int MAX_VALUE int MIN_VALUE LocalDate atDay(int) @@ -450,7 +450,7 @@ class Year -> java.time.Year { Year with(TemporalField,long) } -class YearMonth -> java.time.YearMonth { +class java.time.YearMonth { LocalDate atDay(int) LocalDate atEndOfMonth() int compareTo(YearMonth) @@ -482,7 +482,7 @@ class YearMonth -> java.time.YearMonth { YearMonth withMonth(int) } -class ZonedDateTime -> java.time.ZonedDateTime { +class java.time.ZonedDateTime { int getDayOfMonth() DayOfWeek getDayOfWeek() int getDayOfYear() @@ -544,7 +544,7 @@ class ZonedDateTime -> java.time.ZonedDateTime { ZonedDateTime withZoneSameInstant(ZoneId) } -class ZoneId -> java.time.ZoneId { +class java.time.ZoneId { Map SHORT_IDS Set getAvailableZoneIds() ZoneId of(String) @@ -558,7 +558,7 @@ class ZoneId -> java.time.ZoneId { ZoneRules getRules() } -class ZoneOffset -> java.time.ZoneOffset { +class java.time.ZoneOffset { ZoneOffset MAX ZoneOffset MIN ZoneOffset UTC @@ -573,7 +573,7 @@ class ZoneOffset -> java.time.ZoneOffset { #### Enums -class DayOfWeek -> java.time.DayOfWeek { +class java.time.DayOfWeek { DayOfWeek FRIDAY DayOfWeek MONDAY DayOfWeek SATURDAY @@ -591,7 +591,7 @@ class DayOfWeek -> java.time.DayOfWeek { DayOfWeek[] values() } -class Month -> java.time.Month { +class java.time.Month { Month APRIL Month AUGUST Month DECEMBER @@ -621,7 +621,7 @@ class Month -> java.time.Month { #### Exceptions -class DateTimeException -> java.time.DateTimeException { +class java.time.DateTimeException { (String) } diff --git a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.time.zone.txt b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.time.zone.txt index dfb6fc7a807..59d623cc990 100644 --- a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.time.zone.txt +++ b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.time.zone.txt @@ -24,7 +24,7 @@ #### Classes -class ZoneOffsetTransition -> java.time.zone.ZoneOffsetTransition { +class java.time.zone.ZoneOffsetTransition { int compareTo(ZoneOffsetTransition) LocalDateTime getDateTimeAfter() LocalDateTime getDateTimeBefore() @@ -39,7 +39,7 @@ class ZoneOffsetTransition -> java.time.zone.ZoneOffsetTransition { long toEpochSecond() } -class ZoneOffsetTransitionRule -> java.time.zone.ZoneOffsetTransitionRule { +class java.time.zone.ZoneOffsetTransitionRule { ZoneOffsetTransition createTransition(int) int getDayOfMonthIndicator() DayOfWeek getDayOfWeek() @@ -53,7 +53,7 @@ class ZoneOffsetTransitionRule -> java.time.zone.ZoneOffsetTransitionRule { ZoneOffsetTransitionRule of(Month,int,DayOfWeek,LocalTime,boolean,ZoneOffsetTransitionRule.TimeDefinition,ZoneOffset,ZoneOffset,ZoneOffset) } -class ZoneRules -> java.time.zone.ZoneRules { +class java.time.zone.ZoneRules { Duration getDaylightSavings(Instant) ZoneOffset getOffset(Instant) ZoneOffset getStandardOffset(Instant) @@ -70,7 +70,7 @@ class ZoneRules -> java.time.zone.ZoneRules { ZoneOffsetTransition previousTransition(Instant) } -class ZoneRulesProvider -> java.time.zone.ZoneRulesProvider { +class java.time.zone.ZoneRulesProvider { Set getAvailableZoneIds() ZoneRules getRules(String,boolean) NavigableMap getVersions(String) @@ -78,7 +78,7 @@ class ZoneRulesProvider -> java.time.zone.ZoneRulesProvider { #### Enums -class ZoneOffsetTransitionRule.TimeDefinition -> java.time.zone.ZoneOffsetTransitionRule$TimeDefinition { +class java.time.zone.ZoneOffsetTransitionRule$TimeDefinition { ZoneOffsetTransitionRule.TimeDefinition STANDARD ZoneOffsetTransitionRule.TimeDefinition UTC ZoneOffsetTransitionRule.TimeDefinition WALL @@ -89,6 +89,6 @@ class ZoneOffsetTransitionRule.TimeDefinition -> java.time.zone.ZoneOffsetTransi #### Exceptions -class ZoneRulesException -> java.time.zone.ZoneRulesException { +class java.time.zone.ZoneRulesException { (String) } diff --git a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.util.function.txt b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.util.function.txt index baab868ec0e..708a17a6114 100644 --- a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.util.function.txt +++ b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.util.function.txt @@ -23,174 +23,174 @@ # #### Interfaces -class BiConsumer -> java.util.function.BiConsumer { +class java.util.function.BiConsumer { void accept(def,def) BiConsumer andThen(BiConsumer) } -class BiFunction -> java.util.function.BiFunction { +class java.util.function.BiFunction { BiFunction andThen(Function) def apply(def,def) } -class BinaryOperator -> java.util.function.BinaryOperator { +class java.util.function.BinaryOperator { BinaryOperator maxBy(Comparator) BinaryOperator minBy(Comparator) } -class BiPredicate -> java.util.function.BiPredicate { +class java.util.function.BiPredicate { BiPredicate and(BiPredicate) BiPredicate negate() BiPredicate or(BiPredicate) boolean test(def,def) } -class BooleanSupplier -> java.util.function.BooleanSupplier { +class java.util.function.BooleanSupplier { boolean getAsBoolean() } -class Consumer -> java.util.function.Consumer { +class java.util.function.Consumer { void accept(def) Consumer andThen(Consumer) } -class DoubleBinaryOperator -> java.util.function.DoubleBinaryOperator { +class java.util.function.DoubleBinaryOperator { double applyAsDouble(double,double) } -class DoubleConsumer -> java.util.function.DoubleConsumer { +class java.util.function.DoubleConsumer { void accept(double) DoubleConsumer andThen(DoubleConsumer) } -class DoubleFunction -> java.util.function.DoubleFunction { +class java.util.function.DoubleFunction { def apply(double) } -class DoublePredicate -> java.util.function.DoublePredicate { +class java.util.function.DoublePredicate { DoublePredicate and(DoublePredicate) DoublePredicate negate() DoublePredicate or(DoublePredicate) boolean test(double) } -class DoubleSupplier -> java.util.function.DoubleSupplier { +class java.util.function.DoubleSupplier { double getAsDouble() } -class DoubleToIntFunction -> java.util.function.DoubleToIntFunction { +class java.util.function.DoubleToIntFunction { int applyAsInt(double) } -class DoubleToLongFunction -> java.util.function.DoubleToLongFunction { +class java.util.function.DoubleToLongFunction { long applyAsLong(double) } -class DoubleUnaryOperator -> java.util.function.DoubleUnaryOperator { +class java.util.function.DoubleUnaryOperator { DoubleUnaryOperator andThen(DoubleUnaryOperator) double applyAsDouble(double) DoubleUnaryOperator compose(DoubleUnaryOperator) DoubleUnaryOperator identity() } -class Function -> java.util.function.Function { +class java.util.function.Function { Function andThen(Function) def apply(def) Function compose(Function) Function identity() } -class IntBinaryOperator -> java.util.function.IntBinaryOperator { +class java.util.function.IntBinaryOperator { int applyAsInt(int,int) } -class IntConsumer -> java.util.function.IntConsumer { +class java.util.function.IntConsumer { void accept(int) IntConsumer andThen(IntConsumer) } -class IntFunction -> java.util.function.IntFunction { +class java.util.function.IntFunction { def apply(int) } -class IntPredicate -> java.util.function.IntPredicate { +class java.util.function.IntPredicate { IntPredicate and(IntPredicate) IntPredicate negate() IntPredicate or(IntPredicate) boolean test(int) } -class IntSupplier -> java.util.function.IntSupplier { +class java.util.function.IntSupplier { int getAsInt() } -class IntToDoubleFunction -> java.util.function.IntToDoubleFunction { +class java.util.function.IntToDoubleFunction { double applyAsDouble(int) } -class IntToLongFunction -> java.util.function.IntToLongFunction { +class java.util.function.IntToLongFunction { long applyAsLong(int) } -class IntUnaryOperator -> java.util.function.IntUnaryOperator { +class java.util.function.IntUnaryOperator { IntUnaryOperator andThen(IntUnaryOperator) int applyAsInt(int) IntUnaryOperator compose(IntUnaryOperator) IntUnaryOperator identity() } -class LongBinaryOperator -> java.util.function.LongBinaryOperator { +class java.util.function.LongBinaryOperator { long applyAsLong(long,long) } -class LongConsumer -> java.util.function.LongConsumer { +class java.util.function.LongConsumer { void accept(long) LongConsumer andThen(LongConsumer) } -class LongFunction -> java.util.function.LongFunction { +class java.util.function.LongFunction { def apply(long) } -class LongPredicate -> java.util.function.LongPredicate { +class java.util.function.LongPredicate { LongPredicate and(LongPredicate) LongPredicate negate() LongPredicate or(LongPredicate) boolean test(long) } -class LongSupplier -> java.util.function.LongSupplier { +class java.util.function.LongSupplier { long getAsLong() } -class LongToDoubleFunction -> java.util.function.LongToDoubleFunction { +class java.util.function.LongToDoubleFunction { double applyAsDouble(long) } -class LongToIntFunction -> java.util.function.LongToIntFunction { +class java.util.function.LongToIntFunction { int applyAsInt(long) } -class LongUnaryOperator -> java.util.function.LongUnaryOperator { +class java.util.function.LongUnaryOperator { LongUnaryOperator andThen(LongUnaryOperator) long applyAsLong(long) LongUnaryOperator compose(LongUnaryOperator) LongUnaryOperator identity() } -class ObjDoubleConsumer -> java.util.function.ObjDoubleConsumer { +class java.util.function.ObjDoubleConsumer { void accept(def,double) } -class ObjIntConsumer -> java.util.function.ObjIntConsumer { +class java.util.function.ObjIntConsumer { void accept(def,int) } -class ObjLongConsumer -> java.util.function.ObjLongConsumer { +class java.util.function.ObjLongConsumer { void accept(def,long) } -class Predicate -> java.util.function.Predicate { +class java.util.function.Predicate { Predicate and(Predicate) Predicate isEqual(def) Predicate negate() @@ -198,34 +198,34 @@ class Predicate -> java.util.function.Predicate { boolean test(def) } -class Supplier -> java.util.function.Supplier { +class java.util.function.Supplier { def get() } -class ToDoubleBiFunction -> java.util.function.ToDoubleBiFunction { +class java.util.function.ToDoubleBiFunction { double applyAsDouble(def,def) } -class ToDoubleFunction -> java.util.function.ToDoubleFunction { +class java.util.function.ToDoubleFunction { double applyAsDouble(def) } -class ToIntBiFunction -> java.util.function.ToIntBiFunction { +class java.util.function.ToIntBiFunction { int applyAsInt(def,def) } -class ToIntFunction -> java.util.function.ToIntFunction { +class java.util.function.ToIntFunction { int applyAsInt(def) } -class ToLongBiFunction -> java.util.function.ToLongBiFunction { +class java.util.function.ToLongBiFunction { long applyAsLong(def,def) } -class ToLongFunction -> java.util.function.ToLongFunction { +class java.util.function.ToLongFunction { long applyAsLong(def) } -class UnaryOperator -> java.util.function.UnaryOperator { +class java.util.function.UnaryOperator { UnaryOperator identity() } diff --git a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.util.regex.txt b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.util.regex.txt index 9ea87dd4197..f062d2f6885 100644 --- a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.util.regex.txt +++ b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.util.regex.txt @@ -22,7 +22,7 @@ # what methods and fields they have, etc. # -class Pattern -> java.util.regex.Pattern { +class java.util.regex.Pattern { # Pattern compile(String) Intentionally not included. We don't want dynamic patterns because they allow regexes to be generated per time # the script is run which is super slow. LRegex generates code that calls this method but it skips these checks. Predicate asPredicate() @@ -35,7 +35,7 @@ class Pattern -> java.util.regex.Pattern { Stream splitAsStream(CharSequence) } -class Matcher -> java.util.regex.Matcher { +class java.util.regex.Matcher { int end() int end(int) boolean find() diff --git a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.util.stream.txt b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.util.stream.txt index d531fbb558f..a213300a53f 100644 --- a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.util.stream.txt +++ b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.util.stream.txt @@ -24,7 +24,7 @@ #### Interfaces -class BaseStream -> java.util.stream.BaseStream { +class java.util.stream.BaseStream { void close() boolean isParallel() Iterator iterator() @@ -33,7 +33,7 @@ class BaseStream -> java.util.stream.BaseStream { BaseStream unordered() } -class Collector -> java.util.stream.Collector { +class java.util.stream.Collector { BiConsumer accumulator() Set characteristics() BinaryOperator combiner() @@ -43,7 +43,7 @@ class Collector -> java.util.stream.Collector { Supplier supplier() } -class DoubleStream -> java.util.stream.DoubleStream { +class java.util.stream.DoubleStream { boolean allMatch(DoublePredicate) boolean anyMatch(DoublePredicate) OptionalDouble average() @@ -82,12 +82,12 @@ class DoubleStream -> java.util.stream.DoubleStream { double[] toArray() } -class DoubleStream.Builder -> java.util.stream.DoubleStream$Builder { +class java.util.stream.DoubleStream$Builder { DoubleStream.Builder add(double) DoubleStream build() } -class IntStream -> java.util.stream.IntStream { +class java.util.stream.IntStream { boolean allMatch(IntPredicate) boolean anyMatch(IntPredicate) DoubleStream asDoubleStream() @@ -130,12 +130,12 @@ class IntStream -> java.util.stream.IntStream { int[] toArray() } -class IntStream.Builder -> java.util.stream.IntStream$Builder { +class java.util.stream.IntStream$Builder { IntStream.Builder add(int) IntStream build() } -class LongStream -> java.util.stream.LongStream { +class java.util.stream.LongStream { boolean allMatch(LongPredicate) boolean anyMatch(LongPredicate) DoubleStream asDoubleStream() @@ -177,12 +177,12 @@ class LongStream -> java.util.stream.LongStream { long[] toArray() } -class LongStream.Builder -> java.util.stream.LongStream$Builder { +class java.util.stream.LongStream$Builder { LongStream.Builder add(long) LongStream build() } -class Stream -> java.util.stream.Stream { +class java.util.stream.Stream { boolean allMatch(Predicate) boolean anyMatch(Predicate) Stream.Builder builder() @@ -221,14 +221,14 @@ class Stream -> java.util.stream.Stream { def[] toArray(IntFunction) } -class Stream.Builder -> java.util.stream.Stream$Builder { +class java.util.stream.Stream$Builder { Stream.Builder add(def) Stream build() } #### Classes -class Collectors -> java.util.stream.Collectors { +class java.util.stream.Collectors { Collector averagingDouble(ToDoubleFunction) Collector averagingInt(ToIntFunction) Collector averagingLong(ToLongFunction) @@ -264,7 +264,7 @@ class Collectors -> java.util.stream.Collectors { #### Enums -class Collector.Characteristics -> java.util.stream.Collector$Characteristics { +class java.util.stream.Collector$Characteristics { Collector.Characteristics CONCURRENT Collector.Characteristics IDENTITY_FINISH Collector.Characteristics UNORDERED diff --git a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.util.txt b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.util.txt index 164798e68d3..94f302a891d 100644 --- a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.util.txt +++ b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.util.txt @@ -24,7 +24,7 @@ #### Interfaces -class Collection -> java.util.Collection { +class java.util.Collection { boolean add(def) boolean addAll(Collection) void clear() @@ -50,7 +50,7 @@ class Collection -> java.util.Collection { List org.elasticsearch.painless.api.Augmentation split(Predicate) } -class Comparator -> java.util.Comparator { +class java.util.Comparator { int compare(def,def) Comparator comparing(Function) Comparator comparing(Function,Comparator) @@ -70,7 +70,7 @@ class Comparator -> java.util.Comparator { Comparator thenComparingLong(ToLongFunction) } -class Deque -> java.util.Deque { +class java.util.Deque { void addFirst(def) void addLast(def) Iterator descendingIterator() @@ -91,26 +91,26 @@ class Deque -> java.util.Deque { boolean removeLastOccurrence(def) } -class Enumeration -> java.util.Enumeration { +class java.util.Enumeration { boolean hasMoreElements() def nextElement() } -class EventListener -> java.util.EventListener { +class java.util.EventListener { } -class Formattable -> java.util.Formattable { +class java.util.Formattable { void formatTo(Formatter,int,int,int) } -class Iterator -> java.util.Iterator { +class java.util.Iterator { void forEachRemaining(Consumer) boolean hasNext() def next() void remove() } -class List -> java.util.List { +class java.util.List { void add(int,def) boolean addAll(int,Collection) boolean equals(Object) @@ -128,7 +128,7 @@ class List -> java.util.List { List subList(int,int) } -class ListIterator -> java.util.ListIterator { +class java.util.ListIterator { void add(def) boolean hasPrevious() int nextIndex() @@ -136,7 +136,7 @@ class ListIterator -> java.util.ListIterator { void set(def) } -class Map -> java.util.Map { +class java.util.Map { void clear() def compute(def,BiFunction) def computeIfAbsent(def,Function) @@ -176,7 +176,7 @@ class Map -> java.util.Map { Map org.elasticsearch.painless.api.Augmentation groupBy(BiFunction) } -class Map.Entry -> java.util.Map$Entry { +class java.util.Map$Entry { Comparator comparingByKey() Comparator comparingByKey(Comparator) Comparator comparingByValue() @@ -188,7 +188,7 @@ class Map.Entry -> java.util.Map$Entry { def setValue(def) } -class NavigableMap -> java.util.NavigableMap { +class java.util.NavigableMap { Map.Entry ceilingEntry(def) def ceilingKey(def) NavigableSet descendingKeySet() @@ -208,7 +208,7 @@ class NavigableMap -> java.util.NavigableMap { NavigableMap tailMap(def,boolean) } -class NavigableSet -> java.util.NavigableSet { +class java.util.NavigableSet { def ceiling(def) Iterator descendingIterator() NavigableSet descendingSet() @@ -222,30 +222,30 @@ class NavigableSet -> java.util.NavigableSet { NavigableSet tailSet(def,boolean) } -class Observer -> java.util.Observer { +class java.util.Observer { void update(Observable,Object) } -class PrimitiveIterator -> java.util.PrimitiveIterator { +class java.util.PrimitiveIterator { void forEachRemaining(def) } -class PrimitiveIterator.OfDouble -> java.util.PrimitiveIterator$OfDouble { +class java.util.PrimitiveIterator$OfDouble { Double next() double nextDouble() } -class PrimitiveIterator.OfInt -> java.util.PrimitiveIterator$OfInt { +class java.util.PrimitiveIterator$OfInt { Integer next() int nextInt() } -class PrimitiveIterator.OfLong -> java.util.PrimitiveIterator$OfLong { +class java.util.PrimitiveIterator$OfLong { Long next() long nextLong() } -class Spliterator -> java.util.Spliterator { +class java.util.Spliterator { int CONCURRENT int DISTINCT int IMMUTABLE @@ -264,25 +264,25 @@ class Spliterator -> java.util.Spliterator { Spliterator trySplit() } -class Spliterator.OfPrimitive -> java.util.Spliterator$OfPrimitive { +class java.util.Spliterator$OfPrimitive { void forEachRemaining(def) boolean tryAdvance(def) Spliterator.OfPrimitive trySplit() } -class Spliterator.OfDouble -> java.util.Spliterator$OfDouble { +class java.util.Spliterator$OfDouble { Spliterator.OfDouble trySplit() } -class Spliterator.OfInt -> java.util.Spliterator$OfInt { +class java.util.Spliterator$OfInt { Spliterator.OfInt trySplit() } -class Spliterator.OfLong -> java.util.Spliterator$OfLong { +class java.util.Spliterator$OfLong { Spliterator.OfLong trySplit() } -class Queue -> java.util.Queue { +class java.util.Queue { def element() boolean offer(def) def peek() @@ -290,16 +290,16 @@ class Queue -> java.util.Queue { def remove() } -class RandomAccess -> java.util.RandomAccess { +class java.util.RandomAccess { } -class Set -> java.util.Set { +class java.util.Set { boolean equals(Object) int hashCode() boolean remove(def) } -class SortedMap -> java.util.SortedMap { +class java.util.SortedMap { Comparator comparator() def firstKey() SortedMap headMap(def) @@ -308,7 +308,7 @@ class SortedMap -> java.util.SortedMap { SortedMap tailMap(def) } -class SortedSet -> java.util.SortedSet { +class java.util.SortedSet { Comparator comparator() def first() SortedSet headSet(def) @@ -319,55 +319,55 @@ class SortedSet -> java.util.SortedSet { #### Classes -class AbstractCollection -> java.util.AbstractCollection { +class java.util.AbstractCollection { } -class AbstractList -> java.util.AbstractList { +class java.util.AbstractList { } -class AbstractMap -> java.util.AbstractMap { +class java.util.AbstractMap { } -class AbstractMap.SimpleEntry -> java.util.AbstractMap$SimpleEntry { +class java.util.AbstractMap$SimpleEntry { (def,def) (Map.Entry) } -class AbstractMap.SimpleImmutableEntry -> java.util.AbstractMap$SimpleImmutableEntry { +class java.util.AbstractMap$SimpleImmutableEntry { (def,def) (Map.Entry) } -class AbstractQueue -> java.util.AbstractQueue { +class java.util.AbstractQueue { } -class AbstractSequentialList -> java.util.AbstractSequentialList { +class java.util.AbstractSequentialList { } -class AbstractSet -> java.util.AbstractSet { +class java.util.AbstractSet { } -class ArrayDeque -> java.util.ArrayDeque { +class java.util.ArrayDeque { () (Collection) ArrayDeque clone() } -class ArrayList -> java.util.ArrayList { +class java.util.ArrayList { () (Collection) def clone() void trimToSize() } -class Arrays -> java.util.Arrays { +class java.util.Arrays { List asList(Object[]) boolean deepEquals(Object[],Object[]) int deepHashCode(Object[]) String deepToString(Object[]) } -class Base64 -> java.util.Base64 { +class java.util.Base64 { Base64.Decoder getDecoder() Base64.Encoder getEncoder() Base64.Decoder getMimeDecoder() @@ -377,18 +377,18 @@ class Base64 -> java.util.Base64 { Base64.Encoder getUrlEncoder() } -class Base64.Decoder -> java.util.Base64$Decoder { +class java.util.Base64$Decoder { int decode(byte[],byte[]) byte[] decode(String) } -class Base64.Encoder -> java.util.Base64$Encoder { +class java.util.Base64$Encoder { int encode(byte[],byte[]) String encodeToString(byte[]) Base64.Encoder withoutPadding() } -class BitSet -> java.util.BitSet { +class java.util.BitSet { () (int) void and(BitSet) @@ -418,7 +418,7 @@ class BitSet -> java.util.BitSet { void xor(BitSet) } -class Calendar -> java.util.Calendar { +class java.util.Calendar { int ALL_STYLES int AM int AM_PM @@ -516,7 +516,7 @@ class Calendar -> java.util.Calendar { Instant toInstant() } -class Calendar.Builder -> java.util.Calendar$Builder { +class java.util.Calendar$Builder { () Calendar build() Calendar.Builder set(int,int) @@ -533,7 +533,7 @@ class Calendar.Builder -> java.util.Calendar$Builder { Calendar.Builder setWeekDefinition(int,int) } -class Collections -> java.util.Collections { +class java.util.Collections { List EMPTY_LIST Map EMPTY_MAP Set EMPTY_SET @@ -588,7 +588,7 @@ class Collections -> java.util.Collections { SortedSet unmodifiableSortedSet(SortedSet) } -class Currency -> java.util.Currency { +class java.util.Currency { Set getAvailableCurrencies() String getCurrencyCode() int getDefaultFractionDigits() @@ -600,7 +600,7 @@ class Currency -> java.util.Currency { String getSymbol(Locale) } -class Date -> java.util.Date { +class java.util.Date { () (long) boolean after(Date) @@ -612,7 +612,7 @@ class Date -> java.util.Date { void setTime(long) } -class Dictionary -> java.util.Dictionary { +class java.util.Dictionary { Enumeration elements() def get(def) boolean isEmpty() @@ -622,7 +622,7 @@ class Dictionary -> java.util.Dictionary { int size() } -class DoubleSummaryStatistics -> java.util.DoubleSummaryStatistics { +class java.util.DoubleSummaryStatistics { () void combine(DoubleSummaryStatistics) double getAverage() @@ -632,22 +632,22 @@ class DoubleSummaryStatistics -> java.util.DoubleSummaryStatistics { double getSum() } -class EventListenerProxy -> java.util.EventListenerProxy { +class java.util.EventListenerProxy { EventListener getListener() } -class EventObject -> java.util.EventObject { +class java.util.EventObject { (Object) Object getSource() } -class FormattableFlags -> java.util.FormattableFlags { +class java.util.FormattableFlags { int ALTERNATE int LEFT_JUSTIFY int UPPERCASE } -class Formatter -> java.util.Formatter { +class java.util.Formatter { () (Appendable) (Appendable,Locale) @@ -657,7 +657,7 @@ class Formatter -> java.util.Formatter { Appendable out() } -class GregorianCalendar -> java.util.GregorianCalendar { +class java.util.GregorianCalendar { int AD int BC () @@ -673,31 +673,31 @@ class GregorianCalendar -> java.util.GregorianCalendar { ZonedDateTime toZonedDateTime() } -class HashMap -> java.util.HashMap { +class java.util.HashMap { () (Map) def clone() } -class HashSet -> java.util.HashSet { +class java.util.HashSet { () (Collection) def clone() } -class Hashtable -> java.util.Hashtable { +class java.util.Hashtable { () (Map) def clone() } -class IdentityHashMap -> java.util.IdentityHashMap { +class java.util.IdentityHashMap { () (Map) def clone() } -class IntSummaryStatistics -> java.util.IntSummaryStatistics { +class java.util.IntSummaryStatistics { () void combine(IntSummaryStatistics) double getAverage() @@ -707,23 +707,23 @@ class IntSummaryStatistics -> java.util.IntSummaryStatistics { long getSum() } -class LinkedHashMap -> java.util.LinkedHashMap { +class java.util.LinkedHashMap { () (Map) } -class LinkedHashSet -> java.util.LinkedHashSet { +class java.util.LinkedHashSet { () (Collection) } -class LinkedList -> java.util.LinkedList { +class java.util.LinkedList { () (Collection) def clone() } -class Locale -> java.util.Locale { +class java.util.Locale { Locale CANADA Locale CANADA_FRENCH Locale CHINA @@ -788,7 +788,7 @@ class Locale -> java.util.Locale { String toLanguageTag() } -class Locale.Builder -> java.util.Locale$Builder { +class java.util.Locale$Builder { () Locale.Builder addUnicodeLocaleAttribute(String) Locale build() @@ -805,7 +805,7 @@ class Locale.Builder -> java.util.Locale$Builder { Locale.Builder setVariant(String) } -class Locale.LanguageRange -> java.util.Locale$LanguageRange { +class java.util.Locale$LanguageRange { double MAX_WEIGHT double MIN_WEIGHT (String) @@ -817,7 +817,7 @@ class Locale.LanguageRange -> java.util.Locale$LanguageRange { List parse(String,Map) } -class LongSummaryStatistics -> java.util.LongSummaryStatistics { +class java.util.LongSummaryStatistics { () void combine(LongSummaryStatistics) double getAverage() @@ -827,7 +827,7 @@ class LongSummaryStatistics -> java.util.LongSummaryStatistics { long getSum() } -class Objects -> java.util.Objects { +class java.util.Objects { int compare(def,def,Comparator) boolean deepEquals(Object,Object) boolean equals(Object,Object) @@ -841,7 +841,7 @@ class Objects -> java.util.Objects { String toString(Object,String) } -class Observable -> java.util.Observable { +class java.util.Observable { () void addObserver(Observer) int countObservers() @@ -852,7 +852,7 @@ class Observable -> java.util.Observable { void notifyObservers(Object) } -class Optional -> java.util.Optional { +class java.util.Optional { Optional empty() Optional filter(Predicate) Optional flatMap(Function) @@ -867,7 +867,7 @@ class Optional -> java.util.Optional { def orElseThrow(Supplier) } -class OptionalDouble -> java.util.OptionalDouble { +class java.util.OptionalDouble { OptionalDouble empty() double getAsDouble() void ifPresent(DoubleConsumer) @@ -878,7 +878,7 @@ class OptionalDouble -> java.util.OptionalDouble { double orElseThrow(Supplier) } -class OptionalInt -> java.util.OptionalInt { +class java.util.OptionalInt { OptionalInt empty() int getAsInt() void ifPresent(IntConsumer) @@ -889,7 +889,7 @@ class OptionalInt -> java.util.OptionalInt { int orElseThrow(Supplier) } -class OptionalLong -> java.util.OptionalLong { +class java.util.OptionalLong { OptionalLong empty() long getAsLong() void ifPresent(LongConsumer) @@ -900,12 +900,12 @@ class OptionalLong -> java.util.OptionalLong { long orElseThrow(Supplier) } -class PriorityQueue -> java.util.PriorityQueue { +class java.util.PriorityQueue { () (Comparator) } -class Random -> java.util.Random { +class java.util.Random { () (long) DoubleStream doubles(long) @@ -925,7 +925,7 @@ class Random -> java.util.Random { void setSeed(long) } -class SimpleTimeZone -> java.util.SimpleTimeZone { +class java.util.SimpleTimeZone { int STANDARD_TIME int UTC_TIME int WALL_TIME @@ -944,7 +944,7 @@ class SimpleTimeZone -> java.util.SimpleTimeZone { void setStartYear(int) } -class Spliterators -> java.util.Spliterators { +class java.util.Spliterators { Spliterator.OfDouble emptyDoubleSpliterator() Spliterator.OfInt emptyIntSpliterator() Spliterator.OfLong emptyLongSpliterator() @@ -955,7 +955,7 @@ class Spliterators -> java.util.Spliterators { Spliterator spliteratorUnknownSize(Iterator,int) } -class Stack -> java.util.Stack { +class java.util.Stack { () def push(def) def pop() @@ -964,7 +964,7 @@ class Stack -> java.util.Stack { int search(def) } -class StringJoiner -> java.util.StringJoiner { +class java.util.StringJoiner { (CharSequence) (CharSequence,CharSequence,CharSequence) StringJoiner add(CharSequence) @@ -973,7 +973,7 @@ class StringJoiner -> java.util.StringJoiner { StringJoiner setEmptyValue(CharSequence) } -class StringTokenizer -> java.util.StringTokenizer { +class java.util.StringTokenizer { (String) (String,String) (String,String,boolean) @@ -983,7 +983,7 @@ class StringTokenizer -> java.util.StringTokenizer { String nextToken(String) } -class TimeZone -> java.util.TimeZone { +class java.util.TimeZone { int LONG int SHORT def clone() @@ -1008,19 +1008,19 @@ class TimeZone -> java.util.TimeZone { boolean useDaylightTime() } -class TreeMap -> java.util.TreeMap { +class java.util.TreeMap { () (Comparator) def clone() } -class TreeSet -> java.util.TreeSet { +class java.util.TreeSet { () (Comparator) def clone() } -class UUID -> java.util.UUID { +class java.util.UUID { (long,long) int compareTo(UUID) int clockSequence() @@ -1034,7 +1034,7 @@ class UUID -> java.util.UUID { int version() } -class Vector -> java.util.Vector { +class java.util.Vector { () (Collection) void addElement(def) @@ -1054,19 +1054,19 @@ class Vector -> java.util.Vector { #### Enums -class Formatter.BigDecimalLayoutForm -> java.util.Formatter$BigDecimalLayoutForm { +class java.util.Formatter$BigDecimalLayoutForm { Formatter.BigDecimalLayoutForm DECIMAL_FLOAT Formatter.BigDecimalLayoutForm SCIENTIFIC } -class Locale.Category -> java.util.Locale$Category { +class java.util.Locale$Category { Locale.Category DISPLAY Locale.Category FORMAT Locale.Category valueOf(String) Locale.Category[] values() } -class Locale.FilteringMode -> java.util.Locale$FilteringMode { +class java.util.Locale$FilteringMode { Locale.FilteringMode AUTOSELECT_FILTERING Locale.FilteringMode EXTENDED_FILTERING Locale.FilteringMode IGNORE_EXTENDED_RANGES @@ -1078,101 +1078,101 @@ class Locale.FilteringMode -> java.util.Locale$FilteringMode { #### Exceptions -class ConcurrentModificationException -> java.util.ConcurrentModificationException { +class java.util.ConcurrentModificationException { () (String) } -class DuplicateFormatFlagsException -> java.util.DuplicateFormatFlagsException { +class java.util.DuplicateFormatFlagsException { (String) String getFlags() } -class EmptyStackException -> java.util.EmptyStackException { +class java.util.EmptyStackException { () } -class FormatFlagsConversionMismatchException -> java.util.FormatFlagsConversionMismatchException { +class java.util.FormatFlagsConversionMismatchException { (String,char) char getConversion() String getFlags() } -class FormatterClosedException -> java.util.FormatterClosedException { +class java.util.FormatterClosedException { () } -class IllegalFormatCodePointException -> java.util.IllegalFormatCodePointException { +class java.util.IllegalFormatCodePointException { (int) int getCodePoint() } -class IllegalFormatConversionException -> java.util.IllegalFormatConversionException { +class java.util.IllegalFormatConversionException { char getConversion() } -class IllegalFormatException -> java.util.IllegalFormatException { +class java.util.IllegalFormatException { } -class IllegalFormatFlagsException -> java.util.IllegalFormatFlagsException { +class java.util.IllegalFormatFlagsException { (String) String getFlags() } -class IllegalFormatPrecisionException -> java.util.IllegalFormatPrecisionException { +class java.util.IllegalFormatPrecisionException { (int) int getPrecision() } -class IllegalFormatWidthException -> java.util.IllegalFormatWidthException { +class java.util.IllegalFormatWidthException { (int) int getWidth() } -class IllformedLocaleException -> java.util.IllformedLocaleException { +class java.util.IllformedLocaleException { () (String) (String,int) int getErrorIndex() } -class InputMismatchException -> java.util.InputMismatchException { +class java.util.InputMismatchException { () (String) } -class MissingFormatArgumentException -> java.util.MissingFormatArgumentException { +class java.util.MissingFormatArgumentException { (String) String getFormatSpecifier() } -class MissingFormatWidthException -> java.util.MissingFormatWidthException { +class java.util.MissingFormatWidthException { (String) String getFormatSpecifier() } -class MissingResourceException -> java.util.MissingResourceException { +class java.util.MissingResourceException { (String,String,String) String getClassName() String getKey() } -class NoSuchElementException -> java.util.NoSuchElementException { +class java.util.NoSuchElementException { () (String) } -class TooManyListenersException -> java.util.TooManyListenersException { +class java.util.TooManyListenersException { () (String) } -class UnknownFormatConversionException -> java.util.UnknownFormatConversionException { +class java.util.UnknownFormatConversionException { (String) String getConversion() } -class UnknownFormatFlagsException -> java.util.UnknownFormatFlagsException { +class java.util.UnknownFormatFlagsException { (String) String getFlags() } diff --git a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/joda.time.txt b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/joda.time.txt index 6899e287868..3b2f379c38e 100644 --- a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/joda.time.txt +++ b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/joda.time.txt @@ -26,7 +26,7 @@ # convenient access via the scripting API. classes are fully qualified to avoid # any confusion with java.time -class org.joda.time.ReadableInstant -> org.joda.time.ReadableInstant { +class org.joda.time.ReadableInstant { boolean equals(Object) long getMillis() int hashCode() @@ -36,7 +36,7 @@ class org.joda.time.ReadableInstant -> org.joda.time.ReadableInstant { String toString() } -class org.joda.time.ReadableDateTime -> org.joda.time.ReadableDateTime { +class org.joda.time.ReadableDateTime { int getCenturyOfEra() int getDayOfMonth() int getDayOfWeek() diff --git a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/org.elasticsearch.txt b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/org.elasticsearch.txt index 5ff486b0b81..7c08f76f452 100644 --- a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/org.elasticsearch.txt +++ b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/org.elasticsearch.txt @@ -24,53 +24,53 @@ #### Primitive types -class void -> void { +class void only_fqn { } -class boolean -> boolean { +class boolean only_fqn { } -class byte -> byte { +class byte only_fqn { } -class short -> short { +class short only_fqn { } -class char -> char { +class char only_fqn { } -class int -> int { +class int only_fqn { } -class long -> long { +class long only_fqn { } -class float -> float { +class float only_fqn { } -class double -> double { +class double only_fqn { } #### Painless debugging API -class Debug -> org.elasticsearch.painless.api.Debug { +class org.elasticsearch.painless.api.Debug { void explain(Object) } #### ES Scripting API -class org.elasticsearch.common.geo.GeoPoint -> org.elasticsearch.common.geo.GeoPoint { +class org.elasticsearch.common.geo.GeoPoint { double getLat() double getLon() } -class org.elasticsearch.index.fielddata.ScriptDocValues.Strings -> org.elasticsearch.index.fielddata.ScriptDocValues$Strings { +class org.elasticsearch.index.fielddata.ScriptDocValues$Strings { String get(int) String getValue() List getValues() } -class org.elasticsearch.index.fielddata.ScriptDocValues.Longs -> org.elasticsearch.index.fielddata.ScriptDocValues$Longs { +class org.elasticsearch.index.fielddata.ScriptDocValues$Longs { Long get(int) long getValue() List getValues() @@ -78,7 +78,7 @@ class org.elasticsearch.index.fielddata.ScriptDocValues.Longs -> org.elasticsear List getDates() } -class org.elasticsearch.index.fielddata.ScriptDocValues.Dates -> org.elasticsearch.index.fielddata.ScriptDocValues$Dates { +class org.elasticsearch.index.fielddata.ScriptDocValues$Dates { org.joda.time.ReadableDateTime get(int) org.joda.time.ReadableDateTime getValue() List getValues() @@ -86,13 +86,13 @@ class org.elasticsearch.index.fielddata.ScriptDocValues.Dates -> org.elasticsear List getDates() } -class org.elasticsearch.index.fielddata.ScriptDocValues.Doubles -> org.elasticsearch.index.fielddata.ScriptDocValues$Doubles { +class org.elasticsearch.index.fielddata.ScriptDocValues$Doubles { Double get(int) double getValue() List getValues() } -class org.elasticsearch.index.fielddata.ScriptDocValues.GeoPoints -> org.elasticsearch.index.fielddata.ScriptDocValues$GeoPoints { +class org.elasticsearch.index.fielddata.ScriptDocValues$GeoPoints { org.elasticsearch.common.geo.GeoPoint get(int) org.elasticsearch.common.geo.GeoPoint getValue() List getValues() @@ -110,19 +110,19 @@ class org.elasticsearch.index.fielddata.ScriptDocValues.GeoPoints -> org.elastic double geohashDistanceWithDefault(String,double) } -class org.elasticsearch.index.fielddata.ScriptDocValues.Booleans -> org.elasticsearch.index.fielddata.ScriptDocValues$Booleans { +class org.elasticsearch.index.fielddata.ScriptDocValues$Booleans { Boolean get(int) boolean getValue() List getValues() } -class org.elasticsearch.index.fielddata.ScriptDocValues.BytesRefs -> org.elasticsearch.index.fielddata.ScriptDocValues$BytesRefs { +class org.elasticsearch.index.fielddata.ScriptDocValues$BytesRefs { BytesRef get(int) BytesRef getValue() List getValues() } -class BytesRef -> org.apache.lucene.util.BytesRef { +class org.apache.lucene.util.BytesRef { byte[] bytes int offset int length @@ -130,7 +130,7 @@ class BytesRef -> org.apache.lucene.util.BytesRef { String utf8ToString() } -class org.elasticsearch.index.mapper.IpFieldMapper.IpFieldType.IpScriptDocValues -> org.elasticsearch.index.mapper.IpFieldMapper$IpFieldType$IpScriptDocValues { +class org.elasticsearch.index.mapper.IpFieldMapper$IpFieldType$IpScriptDocValues { String get(int) String getValue() List getValues() @@ -138,7 +138,7 @@ class org.elasticsearch.index.mapper.IpFieldMapper.IpFieldType.IpScriptDocValues # for testing. # currently FeatureTest exposes overloaded constructor, field load store, and overloaded static methods -class org.elasticsearch.painless.FeatureTest -> org.elasticsearch.painless.FeatureTest { +class org.elasticsearch.painless.FeatureTest only_fqn { () (int,int) int getX() @@ -153,28 +153,28 @@ class org.elasticsearch.painless.FeatureTest -> org.elasticsearch.painless.Featu int org.elasticsearch.painless.FeatureTestAugmentation addToTotal(int) } -class org.elasticsearch.search.lookup.FieldLookup -> org.elasticsearch.search.lookup.FieldLookup { +class org.elasticsearch.search.lookup.FieldLookup { def getValue() List getValues() boolean isEmpty() } -class org.elasticsearch.index.similarity.ScriptedSimilarity.Query -> org.elasticsearch.index.similarity.ScriptedSimilarity$Query { +class org.elasticsearch.index.similarity.ScriptedSimilarity$Query { float getBoost() } -class org.elasticsearch.index.similarity.ScriptedSimilarity.Field -> org.elasticsearch.index.similarity.ScriptedSimilarity$Field { +class org.elasticsearch.index.similarity.ScriptedSimilarity$Field { long getDocCount() long getSumDocFreq() long getSumTotalTermFreq() } -class org.elasticsearch.index.similarity.ScriptedSimilarity.Term -> org.elasticsearch.index.similarity.ScriptedSimilarity$Term { +class org.elasticsearch.index.similarity.ScriptedSimilarity$Term { long getDocFreq() long getTotalTermFreq() } -class org.elasticsearch.index.similarity.ScriptedSimilarity.Doc -> org.elasticsearch.index.similarity.ScriptedSimilarity$Doc { +class org.elasticsearch.index.similarity.ScriptedSimilarity$Doc { int getLength() float getFreq() } diff --git a/modules/lang-painless/src/test/java/org/elasticsearch/painless/DebugTests.java b/modules/lang-painless/src/test/java/org/elasticsearch/painless/DebugTests.java index fe50578df1a..ba31ea48d92 100644 --- a/modules/lang-painless/src/test/java/org/elasticsearch/painless/DebugTests.java +++ b/modules/lang-painless/src/test/java/org/elasticsearch/painless/DebugTests.java @@ -44,7 +44,7 @@ public class DebugTests extends ScriptTestCase { assertSame(dummy, e.getObjectToExplain()); assertThat(e.getHeaders(definition), hasEntry("es.to_string", singletonList(dummy.toString()))); assertThat(e.getHeaders(definition), hasEntry("es.java_class", singletonList("java.lang.Object"))); - assertThat(e.getHeaders(definition), hasEntry("es.painless_class", singletonList("Object"))); + assertThat(e.getHeaders(definition), hasEntry("es.painless_class", singletonList("java.lang.Object"))); // Null should be ok e = expectScriptThrows(PainlessExplainError.class, () -> exec("Debug.explain(null)")); @@ -71,7 +71,7 @@ public class DebugTests extends ScriptTestCase { ScriptException e = expectThrows(ScriptException.class, () -> exec("Debug.explain(params.a)", params, true)); assertEquals(singletonList("jumped over the moon"), e.getMetadata("es.to_string")); assertEquals(singletonList("java.lang.String"), e.getMetadata("es.java_class")); - assertEquals(singletonList("String"), e.getMetadata("es.painless_class")); + assertEquals(singletonList("java.lang.String"), e.getMetadata("es.painless_class")); try (BytesStreamOutput out = new BytesStreamOutput()) { out.writeException(e); @@ -79,7 +79,7 @@ public class DebugTests extends ScriptTestCase { ElasticsearchException read = (ScriptException) in.readException(); assertEquals(singletonList("jumped over the moon"), read.getMetadata("es.to_string")); assertEquals(singletonList("java.lang.String"), read.getMetadata("es.java_class")); - assertEquals(singletonList("String"), read.getMetadata("es.painless_class")); + assertEquals(singletonList("java.lang.String"), read.getMetadata("es.painless_class")); } } } diff --git a/modules/lang-painless/src/test/java/org/elasticsearch/painless/RegexTests.java b/modules/lang-painless/src/test/java/org/elasticsearch/painless/RegexTests.java index 92ff9ef3c93..0a66b67a2e8 100644 --- a/modules/lang-painless/src/test/java/org/elasticsearch/painless/RegexTests.java +++ b/modules/lang-painless/src/test/java/org/elasticsearch/painless/RegexTests.java @@ -153,7 +153,7 @@ public class RegexTests extends ScriptTestCase { } public void testSplitAsStream() { - assertEquals(new HashSet<>(Arrays.asList("cat", "dog")), exec("/,/.splitAsStream('cat,dog').collect(Collectors.toSet())")); + assertEquals(new HashSet(Arrays.asList("cat", "dog")), exec("/,/.splitAsStream('cat,dog').collect(Collectors.toSet())")); } // Make sure the flags are set @@ -252,7 +252,7 @@ public class RegexTests extends ScriptTestCase { IllegalArgumentException e = expectScriptThrows(IllegalArgumentException.class, () -> { exec("Pattern.compile('aa')"); }); - assertEquals("Unknown call [compile] with [1] arguments on type [Pattern].", e.getMessage()); + assertEquals("Unknown call [compile] with [1] arguments on type [java.util.regex.Pattern].", e.getMessage()); } public void testBadRegexPattern() { @@ -271,7 +271,7 @@ public class RegexTests extends ScriptTestCase { ClassCastException e = expectScriptThrows(ClassCastException.class, () -> { exec("12 ==~ /cat/"); }); - assertEquals("Cannot cast from [int] to [String].", e.getMessage()); + assertEquals("Cannot cast from [int] to [java.lang.String].", e.getMessage()); } public void testBogusRegexFlag() { diff --git a/modules/lang-painless/src/test/java/org/elasticsearch/painless/node/NodeToStringTests.java b/modules/lang-painless/src/test/java/org/elasticsearch/painless/node/NodeToStringTests.java index b3842615859..a18c27cdef5 100644 --- a/modules/lang-painless/src/test/java/org/elasticsearch/painless/node/NodeToStringTests.java +++ b/modules/lang-painless/src/test/java/org/elasticsearch/painless/node/NodeToStringTests.java @@ -162,12 +162,13 @@ public class NodeToStringTests extends ESTestCase { Location l = new Location(getTestName(), 0); AExpression child = new EConstant(l, "test"); Cast cast = new Cast(Definition.DEFINITION.StringType, Definition.DEFINITION.IntegerType, true); - assertEquals("(ECast Integer (EConstant String 'test'))", new ECast(l, child, cast).toString()); + assertEquals("(ECast java.lang.Integer (EConstant String 'test'))", new ECast(l, child, cast).toString()); l = new Location(getTestName(), 1); child = new EBinary(l, Operation.ADD, new EConstant(l, "test"), new EConstant(l, 12)); cast = new Cast(Definition.DEFINITION.IntegerType, Definition.DEFINITION.BooleanType, true); - assertEquals("(ECast Boolean (EBinary (EConstant String 'test') + (EConstant Integer 12)))", new ECast(l, child, cast).toString()); + assertEquals("(ECast java.lang.Boolean (EBinary (EConstant String 'test') + (EConstant Integer 12)))", + new ECast(l, child, cast).toString()); } public void testEComp() {