Separate Painless Whitelist Loading from the Painless Definition (#26540)

Adds several small whitelist data structures and a new Whitelist class to separate the idea of loading a whitelist from the actual Painless Definition class. This is the first step of many in allowing users to define custom whitelists per context. Also supports the idea of loading multiple whitelists from different sources for a single context.
This commit is contained in:
Jack Conradson 2017-09-18 15:51:07 -07:00 committed by GitHub
parent cc726cb3b6
commit c3746b268c
17 changed files with 1399 additions and 907 deletions

View File

@ -22,14 +22,10 @@ package org.elasticsearch.painless;
import org.apache.lucene.util.Constants;
import org.apache.lucene.util.SetOnce;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.LineNumberReader;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodType;
import java.lang.reflect.Modifier;
import java.nio.charset.StandardCharsets;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.Arrays;
@ -41,6 +37,7 @@ import java.util.Map;
import java.util.Objects;
import java.util.PrimitiveIterator;
import java.util.Spliterator;
import java.util.Stack;
/**
* The entire API for Painless. Also used as a whitelist for checking for legal
@ -48,26 +45,28 @@ import java.util.Spliterator;
*/
public final class Definition {
private static final List<String> DEFINITION_FILES = Collections.unmodifiableList(
Arrays.asList("org.elasticsearch.txt",
"java.lang.txt",
"java.math.txt",
"java.text.txt",
"java.time.txt",
"java.time.chrono.txt",
"java.time.format.txt",
"java.time.temporal.txt",
"java.time.zone.txt",
"java.util.txt",
"java.util.function.txt",
"java.util.regex.txt",
"java.util.stream.txt",
"joda.time.txt"));
private static final String[] DEFINITION_FILES = new String[] {
"org.elasticsearch.txt",
"java.lang.txt",
"java.math.txt",
"java.text.txt",
"java.time.txt",
"java.time.chrono.txt",
"java.time.format.txt",
"java.time.temporal.txt",
"java.time.zone.txt",
"java.util.txt",
"java.util.function.txt",
"java.util.regex.txt",
"java.util.stream.txt",
"joda.time.txt"
};
/**
* Whitelist that is "built in" to Painless and required by all scripts.
*/
public static final Definition BUILTINS = new Definition();
public static final Definition BUILTINS = new Definition(
Collections.singletonList(WhitelistLoader.loadFromResourceFiles(Definition.class, DEFINITION_FILES)));
/** Some native types as constants: */
public static final Type VOID_TYPE = BUILTINS.getType("void");
@ -110,10 +109,10 @@ public final class Definition {
final Struct struct, final Class<?> clazz, final org.objectweb.asm.Type type) {
this.name = name;
this.dimensions = dimensions;
this.dynamic = dynamic;
this.struct = struct;
this.clazz = clazz;
this.type = type;
this.dynamic = dynamic;
}
@Override
@ -523,31 +522,119 @@ public final class Definition {
private final Map<String, Struct> structsMap;
private final Map<String, Type> simpleTypesMap;
private Definition() {
private Definition(List<Whitelist> whitelists) {
structsMap = new HashMap<>();
simpleTypesMap = new HashMap<>();
runtimeMap = new HashMap<>();
// parse the classes and return hierarchy (map of class name -> superclasses/interfaces)
Map<String, List<String>> hierarchy = addStructs();
// add every method for each class
addElements();
// apply hierarchy: this means e.g. copying Object's methods into String (thats how subclasses work)
for (Map.Entry<String,List<String>> clazz : hierarchy.entrySet()) {
copyStruct(clazz.getKey(), clazz.getValue());
Map<Class<?>, Struct> javaClassesToPainlessStructs = new HashMap<>();
String origin = null;
// add the universal def type
structsMap.put("def", new Struct("def", Object.class, org.objectweb.asm.Type.getType(Object.class)));
try {
// first iteration collects all the Painless type names that
// are used for validation during the second iteration
for (Whitelist whitelist : whitelists) {
for (Whitelist.Struct whitelistStruct : whitelist.whitelistStructs) {
Struct painlessStruct = structsMap.get(whitelistStruct.painlessTypeName);
if (painlessStruct != null && painlessStruct.clazz.getName().equals(whitelistStruct.javaClassName) == false) {
throw new IllegalArgumentException("struct [" + painlessStruct.name + "] cannot represent multiple classes " +
"[" + painlessStruct.clazz.getName() + "] and [" + whitelistStruct.javaClassName + "]");
}
origin = whitelistStruct.origin;
addStruct(whitelist.javaClassLoader, whitelistStruct);
painlessStruct = structsMap.get(whitelistStruct.painlessTypeName);
javaClassesToPainlessStructs.put(painlessStruct.clazz, painlessStruct);
}
}
// second iteration adds all the constructors, methods, and fields that will
// be available in Painless along with validating they exist and all their types have
// been white-listed during the first iteration
for (Whitelist whitelist : whitelists) {
for (Whitelist.Struct whitelistStruct : whitelist.whitelistStructs) {
for (Whitelist.Constructor whitelistConstructor : whitelistStruct.whitelistConstructors) {
origin = whitelistConstructor.origin;
addConstructor(whitelistStruct.painlessTypeName, whitelistConstructor);
}
for (Whitelist.Method whitelistMethod : whitelistStruct.whitelistMethods) {
origin = whitelistMethod.origin;
addMethod(whitelist.javaClassLoader, whitelistStruct.painlessTypeName, whitelistMethod);
}
for (Whitelist.Field whitelistField : whitelistStruct.whitelistFields) {
origin = whitelistField.origin;
addField(whitelistStruct.painlessTypeName, whitelistField);
}
}
}
} catch (Exception exception) {
throw new IllegalArgumentException("error loading whitelist(s) " + origin, exception);
}
// if someone declares an interface type, its still an Object
for (Map.Entry<String,Struct> clazz : structsMap.entrySet()) {
String name = clazz.getKey();
Class<?> javaPeer = clazz.getValue().clazz;
if (javaPeer.isInterface()) {
copyStruct(name, Collections.singletonList("Object"));
} else if (name.equals("def") == false && name.equals("Object") == false && javaPeer.isPrimitive() == false) {
// but otherwise, unless its a primitive type, it really should
assert hierarchy.get(name) != null : "class '" + name + "' does not extend Object!";
assert hierarchy.get(name).contains("Object") : "class '" + name + "' does not extend Object!";
// 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()) {
List<String> painlessSuperStructs = new ArrayList<>();
Class<?> javaSuperClass = painlessStruct.clazz.getSuperclass();
Stack<Class<?>> javaInteraceLookups = new Stack<>();
javaInteraceLookups.push(painlessStruct.clazz);
// adds super classes to the inheritance list
if (javaSuperClass != null && javaSuperClass.isInterface() == false) {
while (javaSuperClass != null) {
Struct painlessSuperStruct = javaClassesToPainlessStructs.get(javaSuperClass);
if (painlessSuperStruct != null) {
painlessSuperStructs.add(painlessSuperStruct.name);
}
javaInteraceLookups.push(javaSuperClass);
javaSuperClass = javaSuperClass.getSuperclass();
}
}
// adds all super interfaces to the inheritance list
while (javaInteraceLookups.isEmpty() == false) {
Class<?> javaInterfaceLookup = javaInteraceLookups.pop();
for (Class<?> javaSuperInterface : javaInterfaceLookup.getInterfaces()) {
Struct painlessInterfaceStruct = javaClassesToPainlessStructs.get(javaSuperInterface);
if (painlessInterfaceStruct != null) {
String painlessInterfaceStructName = painlessInterfaceStruct.name;
if (painlessSuperStructs.contains(painlessInterfaceStructName) == false) {
painlessSuperStructs.add(painlessInterfaceStructName);
}
for (Class<?> javaPushInterface : javaInterfaceLookup.getInterfaces()) {
javaInteraceLookups.push(javaPushInterface);
}
}
}
}
// copies methods and fields from super structs to the parent struct
copyStruct(painlessStruct.name, painlessSuperStructs);
// copies methods and fields from Object into interface types
if (painlessStruct.clazz.isInterface() || ("def").equals(painlessStruct.name)) {
Struct painlessObjectStruct = javaClassesToPainlessStructs.get(Object.class);
if (painlessObjectStruct != null) {
copyStruct(painlessStruct.name, Collections.singletonList(painlessObjectStruct.name));
}
}
}
// mark functional interfaces (or set null, to mark class is not)
for (Struct clazz : structsMap.values()) {
clazz.functionalMethod.set(computeFunctionalInterfaceMethod(clazz));
@ -555,7 +642,7 @@ public final class Definition {
// precompute runtime classes
for (Struct struct : structsMap.values()) {
addRuntimeClass(struct);
addRuntimeClass(struct);
}
// copy all structs to make them unmodifiable for outside users:
for (final Map.Entry<String,Struct> entry : structsMap.entrySet()) {
@ -563,384 +650,305 @@ public final class Definition {
}
}
/** adds classes from definition. returns hierarchy */
private Map<String,List<String>> addStructs() {
final Map<String,List<String>> hierarchy = new HashMap<>();
for (String file : DEFINITION_FILES) {
int currentLine = -1;
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 + "]");
}
Class<?> javaClass;
if ("void".equals(whitelistStruct.javaClassName)) javaClass = void.class;
else if ("boolean".equals(whitelistStruct.javaClassName)) javaClass = boolean.class;
else if ("byte".equals(whitelistStruct.javaClassName)) javaClass = byte.class;
else if ("short".equals(whitelistStruct.javaClassName)) javaClass = short.class;
else if ("char".equals(whitelistStruct.javaClassName)) javaClass = char.class;
else if ("int".equals(whitelistStruct.javaClassName)) javaClass = int.class;
else if ("long".equals(whitelistStruct.javaClassName)) javaClass = long.class;
else if ("float".equals(whitelistStruct.javaClassName)) javaClass = float.class;
else if ("double".equals(whitelistStruct.javaClassName)) javaClass = double.class;
else {
try {
try (InputStream stream = Definition.class.getResourceAsStream(file);
LineNumberReader reader = new LineNumberReader(new InputStreamReader(stream, StandardCharsets.UTF_8))) {
String line = null;
while ((line = reader.readLine()) != null) {
currentLine = reader.getLineNumber();
line = line.trim();
if (line.length() == 0 || line.charAt(0) == '#') {
continue;
}
if (line.startsWith("class ")) {
String elements[] = line.split("\u0020");
assert elements[2].equals("->") : "Invalid struct definition [" + String.join(" ", elements) +"]";
if (elements.length == 7) {
hierarchy.put(elements[1], Arrays.asList(elements[5].split(",")));
} else {
assert elements.length == 5 : "Invalid struct definition [" + String.join(" ", elements) + "]";
}
String className = elements[1];
String javaPeer = elements[3];
final Class<?> javaClazz;
switch (javaPeer) {
case "void":
javaClazz = void.class;
break;
case "boolean":
javaClazz = boolean.class;
break;
case "byte":
javaClazz = byte.class;
break;
case "short":
javaClazz = short.class;
break;
case "char":
javaClazz = char.class;
break;
case "int":
javaClazz = int.class;
break;
case "long":
javaClazz = long.class;
break;
case "float":
javaClazz = float.class;
break;
case "double":
javaClazz = double.class;
break;
default:
javaClazz = Class.forName(javaPeer);
break;
}
addStruct(className, javaClazz);
}
}
}
} catch (Exception e) {
throw new RuntimeException("error in " + file + ", line: " + currentLine, e);
}
}
return hierarchy;
}
/** adds class methods/fields/ctors */
private void addElements() {
for (String file : DEFINITION_FILES) {
int currentLine = -1;
try {
try (InputStream stream = Definition.class.getResourceAsStream(file);
LineNumberReader reader = new LineNumberReader(new InputStreamReader(stream, StandardCharsets.UTF_8))) {
String line = null;
String currentClass = null;
while ((line = reader.readLine()) != null) {
currentLine = reader.getLineNumber();
line = line.trim();
if (line.length() == 0 || line.charAt(0) == '#') {
continue;
} else if (line.startsWith("class ")) {
assert currentClass == null;
currentClass = line.split("\u0020")[1];
} else if (line.equals("}")) {
assert currentClass != null;
currentClass = null;
} else {
assert currentClass != null;
addSignature(currentClass, line);
}
}
}
} catch (Exception e) {
throw new RuntimeException("syntax error in " + file + ", line: " + currentLine, e);
}
}
}
private void addStruct(final String name, final Class<?> clazz) {
if (!name.matches("^[_a-zA-Z][\\.,_a-zA-Z0-9]*$")) {
throw new IllegalArgumentException("Invalid struct name [" + name + "].");
}
if (structsMap.containsKey(name)) {
throw new IllegalArgumentException("Duplicate struct name [" + name + "].");
}
final Struct struct = new Struct(name, clazz, org.objectweb.asm.Type.getType(clazz));
structsMap.put(name, struct);
simpleTypesMap.put(name, getTypeInternal(name));
}
private void addConstructorInternal(final String struct, final String name, final Type[] args) {
final Struct owner = structsMap.get(struct);
if (owner == null) {
throw new IllegalArgumentException(
"Owner struct [" + struct + "] not defined for constructor [" + name + "].");
}
if (!name.matches("<init>")) {
throw new IllegalArgumentException(
"Invalid constructor name [" + name + "] with the struct [" + owner.name + "].");
}
MethodKey methodKey = new MethodKey(name, args.length);
if (owner.constructors.containsKey(methodKey)) {
throw new IllegalArgumentException(
"Duplicate constructor [" + methodKey + "] found within the struct [" + owner.name + "].");
}
if (owner.staticMethods.containsKey(methodKey)) {
throw new IllegalArgumentException("Constructors and static methods may not have the same signature" +
" [" + methodKey + "] within the same struct [" + owner.name + "].");
}
if (owner.methods.containsKey(methodKey)) {
throw new IllegalArgumentException("Constructors and methods may not have the same signature" +
" [" + methodKey + "] within the same struct [" + owner.name + "].");
}
final Class<?>[] classes = new Class<?>[args.length];
for (int count = 0; count < classes.length; ++count) {
classes[count] = args[count].clazz;
}
final java.lang.reflect.Constructor<?> reflect;
try {
reflect = owner.clazz.getConstructor(classes);
} catch (final NoSuchMethodException exception) {
throw new IllegalArgumentException("Constructor [" + name + "] not found for class" +
" [" + owner.clazz.getName() + "] with arguments " + Arrays.toString(classes) + ".");
}
final org.objectweb.asm.commons.Method asm = org.objectweb.asm.commons.Method.getMethod(reflect);
final Type returnType = getTypeInternal("void");
final MethodHandle handle;
try {
handle = MethodHandles.publicLookup().in(owner.clazz).unreflectConstructor(reflect);
} catch (final IllegalAccessException exception) {
throw new IllegalArgumentException("Constructor " +
" not found for class [" + owner.clazz.getName() + "]" +
" with arguments " + Arrays.toString(classes) + ".");
}
final Method constructor = new Method(name, owner, null, returnType, Arrays.asList(args), asm, reflect.getModifiers(), handle);
owner.constructors.put(methodKey, constructor);
}
/**
* Adds a new signature to the definition.
* <p>
* Signatures have the following forms:
* <ul>
* <li>{@code void method(String,int)}
* <li>{@code boolean field}
* <li>{@code Class <init>(String)}
* </ul>
* no spaces allowed.
*/
private void addSignature(String className, String signature) {
String elements[] = signature.split("\u0020");
if (elements.length != 2) {
throw new IllegalArgumentException("Malformed signature: " + signature);
}
// method or field type (e.g. return type)
Type rtn = getTypeInternal(elements[0]);
int parenIndex = elements[1].indexOf('(');
if (parenIndex != -1) {
// method or ctor
int parenEnd = elements[1].indexOf(')');
final Type args[];
if (parenEnd > parenIndex + 1) {
String arguments[] = elements[1].substring(parenIndex + 1, parenEnd).split(",");
args = new Type[arguments.length];
for (int i = 0; i < arguments.length; i++) {
args[i] = getTypeInternal(arguments[i]);
}
} else {
args = new Type[0];
}
String methodName = elements[1].substring(0, parenIndex);
if (methodName.equals("<init>")) {
if (!elements[0].equals(className)) {
throw new IllegalArgumentException("Constructors must return their own type");
}
addConstructorInternal(className, "<init>", args);
} else {
int index = methodName.lastIndexOf(".");
if (index >= 0) {
String augmentation = methodName.substring(0, index);
methodName = methodName.substring(index + 1);
addMethodInternal(className, methodName, augmentation, rtn, args);
} else {
addMethodInternal(className, methodName, null, rtn, args);
}
}
} else {
// field
addFieldInternal(className, elements[1], rtn);
}
}
private void addMethodInternal(String struct, String name, String augmentation, Type rtn, Type[] args) {
final Struct owner = structsMap.get(struct);
if (owner == null) {
throw new IllegalArgumentException("Owner struct [" + struct + "] not defined" +
" for method [" + name + "].");
}
if (!name.matches("^[_a-zA-Z][_a-zA-Z0-9]*$")) {
throw new IllegalArgumentException("Invalid method name" +
" [" + name + "] with the struct [" + owner.name + "].");
}
MethodKey methodKey = new MethodKey(name, args.length);
if (owner.constructors.containsKey(methodKey)) {
throw new IllegalArgumentException("Constructors and methods" +
" may not have the same signature [" + methodKey + "] within the same struct" +
" [" + owner.name + "].");
}
if (owner.staticMethods.containsKey(methodKey) || owner.methods.containsKey(methodKey)) {
throw new IllegalArgumentException(
"Duplicate method signature [" + methodKey + "] found within the struct [" + owner.name + "].");
}
final Class<?> implClass;
final Class<?>[] params;
if (augmentation == null) {
implClass = owner.clazz;
params = new Class<?>[args.length];
for (int count = 0; count < args.length; ++count) {
params[count] = args[count].clazz;
}
} else {
try {
implClass = Class.forName(augmentation);
javaClass = Class.forName(whitelistStruct.javaClassName, true, whitelistClassLoader);
} catch (ClassNotFoundException cnfe) {
throw new IllegalArgumentException("Augmentation class [" + augmentation + "]" +
" not found for struct [" + struct + "] using method name [" + name + "].", cnfe);
}
params = new Class<?>[args.length + 1];
params[0] = owner.clazz;
for (int count = 0; count < args.length; ++count) {
params[count+1] = args[count].clazz;
throw new IllegalArgumentException("invalid java class name [" + whitelistStruct.javaClassName + "]" +
" for struct [" + whitelistStruct.painlessTypeName + "]");
}
}
final java.lang.reflect.Method reflect;
Struct existingStruct = structsMap.get(whitelistStruct.painlessTypeName);
try {
reflect = implClass.getMethod(name, params);
} catch (NoSuchMethodException exception) {
throw new IllegalArgumentException("Method [" + name +
"] not found for class [" + implClass.getName() + "]" +
" with arguments " + Arrays.toString(params) + ".");
}
if (existingStruct == null) {
Struct struct = new Struct(whitelistStruct.painlessTypeName, javaClass, org.objectweb.asm.Type.getType(javaClass));
if (!reflect.getReturnType().equals(rtn.clazz)) {
throw new IllegalArgumentException("Specified return type class [" + rtn.clazz + "]" +
" does not match the found return type class [" + reflect.getReturnType() + "] for the" +
" method [" + name + "]" +
" within the struct [" + owner.name + "].");
}
final org.objectweb.asm.commons.Method asm = org.objectweb.asm.commons.Method.getMethod(reflect);
MethodHandle handle;
try {
handle = MethodHandles.publicLookup().in(implClass).unreflect(reflect);
} catch (final IllegalAccessException exception) {
throw new IllegalArgumentException("Method [" + name + "]" +
" not found for class [" + implClass.getName() + "]" +
" with arguments " + Arrays.toString(params) + ".");
}
final int modifiers = reflect.getModifiers();
final Method method =
new Method(name, owner, augmentation == null ? null : implClass, rtn, Arrays.asList(args), asm, modifiers, handle);
if (augmentation == null && java.lang.reflect.Modifier.isStatic(modifiers)) {
owner.staticMethods.put(methodKey, method);
} else {
owner.methods.put(methodKey, method);
structsMap.put(whitelistStruct.painlessTypeName, struct);
simpleTypesMap.put(whitelistStruct.painlessTypeName, getTypeInternal(whitelistStruct.painlessTypeName));
} else if (existingStruct.clazz.equals(javaClass) == false) {
throw new IllegalArgumentException("struct [" + whitelistStruct.painlessTypeName + "] is used to " +
"illegally represent multiple java classes [" + whitelistStruct.javaClassName + "] and " +
"[" + existingStruct.clazz.getName() + "]");
}
}
private void addFieldInternal(String struct, String name, Type type) {
final Struct owner = structsMap.get(struct);
private void addConstructor(String ownerStructName, Whitelist.Constructor whitelistConstructor) {
Struct ownerStruct = structsMap.get(ownerStructName);
if (owner == null) {
throw new IllegalArgumentException("Owner struct [" + struct + "] not defined for " +
" field [" + name + "].");
if (ownerStruct == null) {
throw new IllegalArgumentException("owner struct [" + ownerStructName + "] not defined for constructor with " +
"parameters " + whitelistConstructor.painlessParameterTypeNames);
}
if (!name.matches("^[_a-zA-Z][_a-zA-Z0-9]*$")) {
throw new IllegalArgumentException("Invalid field " +
" name [" + name + "] with the struct [" + owner.name + "].");
List<Type> painlessParametersTypes = new ArrayList<>(whitelistConstructor.painlessParameterTypeNames.size());
Class<?>[] javaClassParameters = new Class<?>[whitelistConstructor.painlessParameterTypeNames.size()];
for (int parameterCount = 0; parameterCount < whitelistConstructor.painlessParameterTypeNames.size(); ++parameterCount) {
String painlessParameterTypeName = whitelistConstructor.painlessParameterTypeNames.get(parameterCount);
try {
Type painlessParameterType = getTypeInternal(painlessParameterTypeName);
painlessParametersTypes.add(painlessParameterType);
javaClassParameters[parameterCount] = painlessParameterType.clazz;
} catch (IllegalArgumentException iae) {
throw new IllegalArgumentException("struct not defined for constructor parameter [" + painlessParameterTypeName + "] " +
"with owner struct [" + ownerStructName + "] and constructor parameters " +
whitelistConstructor.painlessParameterTypeNames, iae);
}
}
if (owner.staticMembers.containsKey(name) || owner.members.containsKey(name)) {
throw new IllegalArgumentException("Duplicate field name [" + name + "]" +
" found within the struct [" + owner.name + "].");
}
java.lang.reflect.Field reflect;
java.lang.reflect.Constructor<?> javaConstructor;
try {
reflect = owner.clazz.getField(name);
} catch (final NoSuchFieldException exception) {
throw new IllegalArgumentException("Field [" + name + "]" +
" not found for class [" + owner.clazz.getName() + "].");
javaConstructor = ownerStruct.clazz.getConstructor(javaClassParameters);
} catch (NoSuchMethodException exception) {
throw new IllegalArgumentException("constructor not defined for owner struct [" + ownerStructName + "] " +
" with constructor parameters " + whitelistConstructor.painlessParameterTypeNames, exception);
}
final int modifiers = reflect.getModifiers();
boolean isStatic = java.lang.reflect.Modifier.isStatic(modifiers);
MethodKey painlessMethodKey = new MethodKey("<init>", whitelistConstructor.painlessParameterTypeNames.size());
Method painlessConstructor = ownerStruct.constructors.get(painlessMethodKey);
MethodHandle getter = null;
MethodHandle setter = null;
if (painlessConstructor == null) {
org.objectweb.asm.commons.Method asmConstructor = org.objectweb.asm.commons.Method.getMethod(javaConstructor);
MethodHandle javaHandle;
try {
javaHandle = MethodHandles.publicLookup().in(ownerStruct.clazz).unreflectConstructor(javaConstructor);
} catch (IllegalAccessException exception) {
throw new IllegalArgumentException("constructor not defined for owner struct [" + ownerStructName + "] " +
" with constructor parameters " + whitelistConstructor.painlessParameterTypeNames);
}
painlessConstructor = new Method("<init>", ownerStruct, null, getTypeInternal("void"), painlessParametersTypes,
asmConstructor, javaConstructor.getModifiers(), javaHandle);
ownerStruct.constructors.put(painlessMethodKey, painlessConstructor);
} else if (painlessConstructor.equals(painlessParametersTypes) == false){
throw new IllegalArgumentException(
"illegal duplicate constructors [" + painlessMethodKey + "] found within the struct [" + ownerStruct.name + "] " +
"with parameters " + painlessParametersTypes + " and " + painlessConstructor.arguments);
}
}
private void addMethod(ClassLoader whitelistClassLoader, String ownerStructName, Whitelist.Method whitelistMethod) {
Struct ownerStruct = structsMap.get(ownerStructName);
if (ownerStruct == null) {
throw new IllegalArgumentException("owner struct [" + ownerStructName + "] not defined for method with " +
"name [" + whitelistMethod.javaMethodName + "] and parameters " + whitelistMethod.painlessParameterTypeNames);
}
if (!whitelistMethod.javaMethodName.matches("^[_a-zA-Z][_a-zA-Z0-9]*$")) {
throw new IllegalArgumentException("invalid method name" +
" [" + whitelistMethod.javaMethodName + "] for owner struct [" + ownerStructName + "].");
}
Class<?> javaAugmentedClass = null;
if (whitelistMethod.javaAugmentedClassName != null) {
try {
javaAugmentedClass = Class.forName(whitelistMethod.javaAugmentedClassName, true, whitelistClassLoader);
} catch (ClassNotFoundException cnfe) {
throw new IllegalArgumentException("augmented class [" + whitelistMethod.javaAugmentedClassName + "] " +
"not found for method with name [" + whitelistMethod.javaMethodName + "] " +
"and parameters " + whitelistMethod.painlessParameterTypeNames, cnfe);
}
}
int augmentedOffset = javaAugmentedClass == null ? 0 : 1;
List<Type> painlessParametersTypes = new ArrayList<>(whitelistMethod.painlessParameterTypeNames.size());
Class<?>[] javaClassParameters = new Class<?>[whitelistMethod.painlessParameterTypeNames.size() + augmentedOffset];
if (javaAugmentedClass != null) {
javaClassParameters[0] = ownerStruct.clazz;
}
for (int parameterCount = 0; parameterCount < whitelistMethod.painlessParameterTypeNames.size(); ++parameterCount) {
String painlessParameterTypeName = whitelistMethod.painlessParameterTypeNames.get(parameterCount);
try {
Type painlessParameterType = getTypeInternal(painlessParameterTypeName);
painlessParametersTypes.add(painlessParameterType);
javaClassParameters[parameterCount + augmentedOffset] = painlessParameterType.clazz;
} catch (IllegalArgumentException iae) {
throw new IllegalArgumentException("struct not defined for method parameter [" + painlessParameterTypeName + "] " +
"with owner struct [" + ownerStructName + "] and method with name [" + whitelistMethod.javaMethodName + "] " +
"and parameters " + whitelistMethod.painlessParameterTypeNames, iae);
}
}
Class<?> javaImplClass = javaAugmentedClass == null ? ownerStruct.clazz : javaAugmentedClass;
java.lang.reflect.Method javaMethod;
try {
if (!isStatic) {
getter = MethodHandles.publicLookup().unreflectGetter(reflect);
setter = MethodHandles.publicLookup().unreflectSetter(reflect);
}
} catch (final IllegalAccessException exception) {
throw new IllegalArgumentException("Getter/Setter [" + name + "]" +
" not found for class [" + owner.clazz.getName() + "].");
javaMethod = javaImplClass.getMethod(whitelistMethod.javaMethodName, javaClassParameters);
} catch (NoSuchMethodException nsme) {
throw new IllegalArgumentException("method with name [" + whitelistMethod.javaMethodName + "] " +
"and parameters " + whitelistMethod.painlessParameterTypeNames + " not found for class [" +
javaImplClass.getName() + "]", nsme);
}
final Field field = new Field(name, reflect.getName(), owner, type, modifiers, getter, setter);
Type painlessReturnType;
if (isStatic) {
// require that all static fields are static final
if (!java.lang.reflect.Modifier.isFinal(modifiers)) {
throw new IllegalArgumentException("Static [" + name + "]" +
" within the struct [" + owner.name + "] is not final.");
try {
painlessReturnType = getTypeInternal(whitelistMethod.painlessReturnTypeName);
} catch (IllegalArgumentException iae) {
throw new IllegalArgumentException("struct not defined for return type [" + whitelistMethod.painlessReturnTypeName + "] " +
"with owner struct [" + ownerStructName + "] and method with name [" + whitelistMethod.javaMethodName + "] " +
"and parameters " + whitelistMethod.painlessParameterTypeNames, iae);
}
if (javaMethod.getReturnType().equals(painlessReturnType.clazz) == false) {
throw new IllegalArgumentException("specified return type class [" + painlessReturnType.clazz + "] " +
"does not match the return type class [" + javaMethod.getReturnType() + "] for the " +
"method with name [" + whitelistMethod.javaMethodName + "] " +
"and parameters " + whitelistMethod.painlessParameterTypeNames);
}
MethodKey painlessMethodKey = new MethodKey(whitelistMethod.javaMethodName, whitelistMethod.painlessParameterTypeNames.size());
if (javaAugmentedClass == null && Modifier.isStatic(javaMethod.getModifiers())) {
Method painlessMethod = ownerStruct.staticMethods.get(painlessMethodKey);
if (painlessMethod == null) {
org.objectweb.asm.commons.Method asmMethod = org.objectweb.asm.commons.Method.getMethod(javaMethod);
MethodHandle javaMethodHandle;
try {
javaMethodHandle = MethodHandles.publicLookup().in(javaImplClass).unreflect(javaMethod);
} catch (IllegalAccessException exception) {
throw new IllegalArgumentException("method handle not found for method with name " +
"[" + whitelistMethod.javaMethodName + "] and parameters " + whitelistMethod.painlessParameterTypeNames);
}
painlessMethod = new Method(whitelistMethod.javaMethodName, ownerStruct, null, painlessReturnType,
painlessParametersTypes, asmMethod, javaMethod.getModifiers(), javaMethodHandle);
ownerStruct.staticMethods.put(painlessMethodKey, painlessMethod);
} else if ((painlessMethod.name.equals(whitelistMethod.javaMethodName) && painlessMethod.rtn.equals(painlessReturnType) &&
painlessMethod.arguments.equals(painlessParametersTypes)) == false) {
throw new IllegalArgumentException("illegal duplicate static methods [" + painlessMethodKey + "] " +
"found within the struct [" + ownerStruct.name + "] with name [" + whitelistMethod.javaMethodName + "], " +
"return types [" + painlessReturnType + "] and [" + painlessMethod.rtn.name + "], " +
"and parameters " + painlessParametersTypes + " and " + painlessMethod.arguments);
}
owner.staticMembers.put(name, field);
} else {
owner.members.put(name, field);
Method painlessMethod = ownerStruct.methods.get(painlessMethodKey);
if (painlessMethod == null) {
org.objectweb.asm.commons.Method asmMethod = org.objectweb.asm.commons.Method.getMethod(javaMethod);
MethodHandle javaMethodHandle;
try {
javaMethodHandle = MethodHandles.publicLookup().in(javaImplClass).unreflect(javaMethod);
} catch (IllegalAccessException exception) {
throw new IllegalArgumentException("method handle not found for method with name " +
"[" + whitelistMethod.javaMethodName + "] and parameters " + whitelistMethod.painlessParameterTypeNames);
}
painlessMethod = new Method(whitelistMethod.javaMethodName, ownerStruct, javaAugmentedClass, painlessReturnType,
painlessParametersTypes, asmMethod, javaMethod.getModifiers(), javaMethodHandle);
ownerStruct.methods.put(painlessMethodKey, painlessMethod);
} else if ((painlessMethod.name.equals(whitelistMethod.javaMethodName) && painlessMethod.rtn.equals(painlessReturnType) &&
painlessMethod.arguments.equals(painlessParametersTypes)) == false) {
throw new IllegalArgumentException("illegal duplicate member methods [" + painlessMethodKey + "] " +
"found within the struct [" + ownerStruct.name + "] with name [" + whitelistMethod.javaMethodName + "], " +
"return types [" + painlessReturnType + "] and [" + painlessMethod.rtn.name + "], " +
"and parameters " + painlessParametersTypes + " and " + painlessMethod.arguments);
}
}
}
private void addField(String ownerStructName, Whitelist.Field whitelistField) {
Struct ownerStruct = structsMap.get(ownerStructName);
if (ownerStruct == null) {
throw new IllegalArgumentException("owner struct [" + ownerStructName + "] not defined for method with " +
"name [" + whitelistField.javaFieldName + "] and type " + whitelistField.painlessFieldTypeName);
}
if (!whitelistField.javaFieldName.matches("^[_a-zA-Z][_a-zA-Z0-9]*$")) {
throw new IllegalArgumentException("invalid field name " +
"[" + whitelistField.painlessFieldTypeName + "] for owner struct [" + ownerStructName + "].");
}
java.lang.reflect.Field javaField;
try {
javaField = ownerStruct.clazz.getField(whitelistField.javaFieldName);
} catch (NoSuchFieldException exception) {
throw new IllegalArgumentException("field [" + whitelistField.javaFieldName + "] " +
"not found for class [" + ownerStruct.clazz.getName() + "].");
}
Type painlessFieldType;
try {
painlessFieldType = getTypeInternal(whitelistField.painlessFieldTypeName);
} catch (IllegalArgumentException iae) {
throw new IllegalArgumentException("struct not defined for return type [" + whitelistField.painlessFieldTypeName + "] " +
"with owner struct [" + ownerStructName + "] and field with name [" + whitelistField.javaFieldName + "]", iae);
}
if (Modifier.isStatic(javaField.getModifiers())) {
if (Modifier.isFinal(javaField.getModifiers()) == false) {
throw new IllegalArgumentException("static [" + whitelistField.javaFieldName + "] " +
"with owner struct [" + ownerStruct.name + "] is not final");
}
Field painlessField = ownerStruct.staticMembers.get(whitelistField.javaFieldName);
if (painlessField == null) {
painlessField = new Field(whitelistField.javaFieldName, javaField.getName(),
ownerStruct, painlessFieldType, javaField.getModifiers(), null, null);
ownerStruct.staticMembers.put(whitelistField.javaFieldName, painlessField);
} else if (painlessField.type.equals(painlessFieldType) == false) {
throw new IllegalArgumentException("illegal duplicate static fields [" + whitelistField.javaFieldName + "] " +
"found within the struct [" + ownerStruct.name + "] with type [" + whitelistField.painlessFieldTypeName + "]");
}
} else {
MethodHandle javaMethodHandleGetter = null;
MethodHandle javaMethodHandleSetter = null;
try {
if (Modifier.isStatic(javaField.getModifiers()) == false) {
javaMethodHandleGetter = MethodHandles.publicLookup().unreflectGetter(javaField);
javaMethodHandleSetter = MethodHandles.publicLookup().unreflectSetter(javaField);
}
} catch (IllegalAccessException exception) {
throw new IllegalArgumentException("getter/setter [" + whitelistField.javaFieldName + "]" +
" not found for class [" + ownerStruct.clazz.getName() + "].");
}
Field painlessField = ownerStruct.staticMembers.get(whitelistField.javaFieldName);
if (painlessField == null) {
painlessField = new Field(whitelistField.javaFieldName, javaField.getName(),
ownerStruct, painlessFieldType, javaField.getModifiers(), javaMethodHandleGetter, javaMethodHandleSetter);
ownerStruct.staticMembers.put(whitelistField.javaFieldName, painlessField);
} else if (painlessField.type.equals(painlessFieldType) == false) {
throw new IllegalArgumentException("illegal duplicate member fields [" + whitelistField.javaFieldName + "] " +
"found within the struct [" + ownerStruct.name + "] with type [" + whitelistField.painlessFieldTypeName + "]");
}
}
}
@ -968,8 +976,12 @@ public final class Definition {
MethodKey methodKey = kvPair.getKey();
Method method = kvPair.getValue();
if (owner.methods.get(methodKey) == null) {
// TODO: some of these are no longer valid or outright don't work
// TODO: since classes may not come from the Painless classloader
// TODO: and it was dependent on the order of the extends which
// TODO: which no longer exists since this is generated automatically
// sanity check, look for missing covariant/generic override
if (owner.clazz.isInterface() && child.clazz == Object.class) {
/*if (owner.clazz.isInterface() && child.clazz == Object.class) {
// ok
} else if (child.clazz == Spliterator.OfPrimitive.class || child.clazz == PrimitiveIterator.class) {
// ok, we rely on generics erasure for these (its guaranteed in the javadocs though!!!!)
@ -1009,7 +1021,7 @@ public final class Definition {
} catch (ReflectiveOperationException e) {
throw new AssertionError(e);
}
}
}*/
owner.methods.put(methodKey, method);
}
}
@ -1104,7 +1116,7 @@ public final class Definition {
if (methods.size() != 1) {
if (hasAnnotation) {
throw new IllegalArgumentException("Class: " + clazz.name +
" is marked with FunctionalInterface but doesn't fit the bill: " + methods);
" is marked with FunctionalInterface but doesn't fit the bill: " + methods);
}
return null;
}
@ -1113,7 +1125,7 @@ public final class Definition {
Method painless = clazz.methods.get(new Definition.MethodKey(oneMethod.getName(), oneMethod.getParameterCount()));
if (painless == null || painless.method.equals(org.objectweb.asm.commons.Method.getMethod(oneMethod)) == false) {
throw new IllegalArgumentException("Class: " + clazz.name + " is functional but the functional " +
"method is not whitelisted!");
"method is not whitelisted!");
}
return painless;
}

View File

@ -0,0 +1,198 @@
/*
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch.painless;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
/**
* Whitelist contains data structures designed to be used to generate a white-list of Java classes,
* constructors, methods, and fields that can be used within a Painless script at both compile-time
* and run-time.
*
* A white-list consists of several pieces with {@link Struct}s as the top level. Each {@link Struct}
* will contain zero-to-many {@link Constructor}s, {@link Method}s, and {@link Field}s which are what
* will be available with a Painless script. See each individual white-list object for more detail.
*/
public final class Whitelist {
/**
* Struct represents the equivalent of a Java class in Painless complete with super classes,
* constructors, methods, and fields. In Painless a class is known as a struct primarily to avoid
* naming conflicts internally. There must be a one-to-one mapping of struct names to Java classes.
* Though, since multiple white-lists may be combined into a single white-list for a specific
* {@link org.elasticsearch.script.ScriptContext}, as long as multiple structs representing the same
* Java class have the same Painless type name and have legal constructor/method overloading they
* can be merged together.
*
* Structs in Painless allow for arity overloading for constructors and methods. Arity overloading
* means that multiple constructors are allowed for a single struct as long as they have a different
* number of parameter types, and multiples methods with the same name are allowed for a single struct
* as long as they have the same return type and a different number of parameter types.
*
* Structs will automatically extend other white-listed structs if the Java class they represent is a
* subclass of other structs including Java interfaces.
*/
public static final class Struct {
/** 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;
/** The {@link List} of white-listed ({@link Constructor}s) available to this struct. */
public final List<Constructor> whitelistConstructors;
/** The {@link List} of white-listed ({@link Method}s) available to this struct. */
public final List<Method> whitelistMethods;
/** The {@link List} of white-listed ({@link Field}s) available to this struct. */
public final List<Field> whitelistFields;
/** Standard constructor. All values must be not {@code null}. */
public Struct(String origin, String painlessTypeName, String javaClassName,
List<Constructor> whitelistConstructors, List<Method> whitelistMethods, List<Field> whitelistFields) {
this.origin = Objects.requireNonNull(origin);
this.painlessTypeName = Objects.requireNonNull(painlessTypeName);
this.javaClassName = Objects.requireNonNull(javaClassName);
this.whitelistConstructors = Collections.unmodifiableList(Objects.requireNonNull(whitelistConstructors));
this.whitelistMethods = Collections.unmodifiableList(Objects.requireNonNull(whitelistMethods));
this.whitelistFields = Collections.unmodifiableList(Objects.requireNonNull(whitelistFields));
}
}
/**
* Constructor represents the equivalent of a Java constructor available as a white-listed struct
* constructor within Painless. Constructors for Painless structs may be accessed exactly as
* constructors for Java classes are using the 'new' keyword. Painless structs may have multiple
* constructors as long as they comply with arity overloading described for {@link Struct}.
*/
public static final class Constructor {
/** Information about where this constructor was white-listed from. Can be used for error messages. */
public final String origin;
/**
* A {@link List} of {@link String}s that are the Painless type names for the parameters of the
* constructor which can be used to look up the Java constructor through reflection.
*/
public final List<String> painlessParameterTypeNames;
/** Standard constructor. All values must be not {@code null}. */
public Constructor(String origin, List<String> painlessParameterTypeNames) {
this.origin = Objects.requireNonNull(origin);
this.painlessParameterTypeNames = Collections.unmodifiableList(Objects.requireNonNull(painlessParameterTypeNames));
}
}
/**
* Method represents the equivalent of a Java method available as a white-listed struct method
* within Painless. Methods for Painless structs may be accessed exactly as methods for Java classes
* are using the '.' operator on an existing struct variable/field. Painless structs may have multiple
* methods with the same name as long as they comply with arity overloading described for {@link Method}.
*
* Structs may also have additional methods that are not part of the Java class the struct represents -
* these are known as augmented methods. An augmented method can be added to a struct as a part of any
* Java class as long as the method is static and the first parameter of the method is the Java class
* represented by the struct. Note that the augmented method's parent Java class does not need to be
* white-listed.
*/
public static class Method {
/** Information about where this method was white-listed from. Can be used for error messages. */
public final String origin;
/**
* The Java class name for the owner of an augmented method. If the method is not augmented
* this should be {@code null}.
*/
public final String javaAugmentedClassName;
/** The Java method name used to look up the Java method through reflection. */
public final String javaMethodName;
/**
* The Painless type name for the return type of the method which can be used to look up the Java
* method through reflection.
*/
public final String painlessReturnTypeName;
/**
* A {@link List} of {@link String}s that are the Painless type names for the parameters of the
* method which can be used to look up the Java method through reflection.
*/
public final List<String> painlessParameterTypeNames;
/**
* Standard constructor. All values must be not {@code null} with the exception of jAugmentedClass;
* jAugmentedClass will be {@code null} unless the method is augmented as described in the class documentation.
*/
public Method(String origin, String javaAugmentedClassName, String javaMethodName,
String painlessReturnTypeName, List<String> painlessParameterTypeNames) {
this.origin = Objects.requireNonNull(origin);
this.javaAugmentedClassName = javaAugmentedClassName;
this.javaMethodName = javaMethodName;
this.painlessReturnTypeName = Objects.requireNonNull(painlessReturnTypeName);
this.painlessParameterTypeNames = Collections.unmodifiableList(Objects.requireNonNull(painlessParameterTypeNames));
}
}
/**
* Field represents the equivalent of a Java field available as a white-listed struct field
* within Painless. Fields for Painless structs may be accessed exactly as fields for Java classes
* are using the '.' operator on an existing struct variable/field.
*/
public static class Field {
/** Information about where this method was white-listed from. Can be used for error messages. */
public final String origin;
/** The Java field name used to look up the Java field through reflection. */
public final String javaFieldName;
/** The Painless type name for the field which can be used to look up the Java field through reflection. */
public final String painlessFieldTypeName;
/** Standard constructor. All values must be not {@code null}. */
public Field(String origin, String javaFieldName, String painlessFieldTypeName) {
this.origin = Objects.requireNonNull(origin);
this.javaFieldName = Objects.requireNonNull(javaFieldName);
this.painlessFieldTypeName = Objects.requireNonNull(painlessFieldTypeName);
}
}
/** The {@link ClassLoader} used to look up the white-listed Java classes, constructors, methods, and fields. */
public final ClassLoader javaClassLoader;
/** The {@link List} of all the white-listed Painless structs. */
public final List<Struct> whitelistStructs;
/** Standard constructor. All values must be not {@code null}. */
public Whitelist(ClassLoader javaClassLoader, List<Struct> whitelistStructs) {
this.javaClassLoader = Objects.requireNonNull(javaClassLoader);
this.whitelistStructs = Collections.unmodifiableList(Objects.requireNonNull(whitelistStructs));
}
}

View File

@ -0,0 +1,290 @@
/*
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch.painless;
import java.io.InputStreamReader;
import java.io.LineNumberReader;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/** Loads and creates a {@link Whitelist} from one to many text files. */
public final class WhitelistLoader {
/**
* Loads and creates a {@link Whitelist} from one to many text files. The file paths are passed in as an array of
* {@link String}s with a single {@link Class} to be be used to load the resources where each {@link String}
* is the path of a single text file. The {@link Class}'s {@link ClassLoader} will be used to lookup the Java
* reflection objects for each individual {@link Class}, {@link Constructor}, {@link Method}, and {@link Field}
* specified as part of the white-list in the text file.
*
* A single pass is made through each file to collect all the information about each struct, constructor, method,
* and field. Most validation will be done at a later point after all white-lists have been gathered and their
* merging takes place.
*
* The following can be parsed from each white-list text file:
* <ul>
* <li> Blank lines will be ignored by the parser. </li>
* <li> Comments may be created starting with a pound '#' symbol and end with a newline. These will
* be ignored by the parser. </li>
* <li> 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,
* an opening bracket, a newline, a closing bracket, and a final newline. </li>
* <li> 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:
* <ul>
* <li> 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
* the equivalent Java parameter types (these must be white-listed as well), a closing
* parenthesis, and a newline. </li>
* <li> A method may be specified starting with a Painless type name for the return type,
* followed by the Java name of the method (which will also be the Painless name for the
* method), an opening parenthesis, a comma-delimited list of Painless type names
* corresponding to the type/class names for the equivalent Java parameter types
* (these must be white-listed as well), a closing parenthesis, and a newline. </li>
* <li> An augmented method may be specified starting with a Painless type name for the return
* type, followed by the fully qualified Java name of the class the augmented method is
* part of (this class does not need to be white-listed), the Java name of the method
* (which will also be the Painless name for the method), an opening parenthesis, a
* comma-delimited list of Painless type names corresponding to the type/class names
* for the equivalent Java parameter types (these must be white-listed as well), a closing
* parenthesis, and a newline. </li>
* <li>A field may be specified starting with a Painless type name for the equivalent Java type
* of the field, followed by the Java name of the field (which all be the Painless name
* for the field), and a newline. </li>
* </ul>
* </ul>
*
* Note there must be a one-to-one correspondence of Painless type names to Java type/class names.
* 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.
*
* The following example is used to create a single white-list text file:
*
* {@code
* # primitive types
*
* class int -> int {
* }
*
* # complex types
*
* class Example -> my.package.Example {
* # constructors
* ()
* (int)
* (def, def)
* (Example, def)
*
* # method
* Example add(int, def)
* int add(Example, Example)
* void example()
*
* # augmented
* Example some.other.Class sub(Example, int, def)
*
* # fields
* int value0
* int value1
* def value2
* }
* }
*/
public static Whitelist loadFromResourceFiles(Class<?> resource, String... filepaths) {
List<Whitelist.Struct> whitelistStructs = new ArrayList<>();
// Execute a single pass through the white-list text files. This will gather all the
// constructors, methods, augmented methods, and fields for each white-listed struct.
for (String filepath : filepaths) {
String line;
int number = -1;
try (LineNumberReader reader = new LineNumberReader(
new InputStreamReader(resource.getResourceAsStream(filepath), StandardCharsets.UTF_8))) {
String whitelistStructOrigin = null;
String painlessTypeName = null;
String javaClassName = null;
List<Whitelist.Constructor> whitelistConstructors = null;
List<Whitelist.Method> whitelistMethods = null;
List<Whitelist.Field> whitelistFields = null;
while ((line = reader.readLine()) != null) {
number = reader.getLineNumber();
line = line.trim();
// Skip any lines that are either blank or comments.
if (line.length() == 0 || line.charAt(0) == '#') {
continue;
}
// 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'
if (line.startsWith("class ")) {
// Ensure the final token of the line is '{'.
if (line.endsWith("{") == false) {
throw new IllegalArgumentException(
"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("->");
// Ensure the correct number of tokens.
if (tokens.length != 2) {
throw new IllegalArgumentException("invalid struct definition: failed to parse class name [" + line + "]");
}
whitelistStructOrigin = "[" + filepath + "]:[" + number + "]";
painlessTypeName = tokens[0];
javaClassName = tokens[1];
// Reset all the constructors, methods, and fields to support a new struct.
whitelistConstructors = new ArrayList<>();
whitelistMethods = new ArrayList<>();
whitelistFields = new ArrayList<>();
// Handle the end of a struct, by creating a new Whitelist.Struct with all the previously gathered
// 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) {
throw new IllegalArgumentException("invalid struct definition: extraneous closing bracket");
}
whitelistStructs.add(new Whitelist.Struct(whitelistStructOrigin, painlessTypeName, javaClassName,
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;
whitelistConstructors = null;
whitelistMethods = null;
whitelistFields = null;
// Handle all other valid cases.
} else {
// Mark the origin of this parsable object.
String origin = "[" + filepath + "]:[" + number + "]";
// Ensure we have a defined struct before adding any constructors, methods, augmented methods, or fields.
if (painlessTypeName == null) {
throw new IllegalArgumentException("invalid object definition: expected a class name [" + line + "]");
}
// Handle the case for a constructor definition.
// Expects the following format: '(' ( ID ( ',' ID )* )? ')' '\n'
if (line.startsWith("(")) {
// Ensure the final token of the line is ')'.
if (line.endsWith(")") == false) {
throw new IllegalArgumentException(
"invalid constructor definition: expected a closing parenthesis [" + line + "]");
}
// Parse the constructor parameters.
String[] tokens = line.substring(1, line.length() - 1).replaceAll("\\s+", "").split(",");
// Handle the case for a constructor with no parameters.
if ("".equals(tokens[0])) {
tokens = new String[0];
}
whitelistConstructors.add(new Whitelist.Constructor(origin, Arrays.asList(tokens)));
// Handle the case for a method or augmented method definition.
// Expects the following format: ID ID? ID '(' ( ID ( ',' ID )* )? ')' '\n'
} else if (line.contains("(")) {
// Ensure the final token of the line is ')'.
if (line.endsWith(")") == false) {
throw new IllegalArgumentException(
"invalid method definition: expected a closing parenthesis [" + line + "]");
}
// Parse the tokens prior to the method parameters.
int parameterIndex = line.indexOf('(');
String[] tokens = line.substring(0, parameterIndex).split("\\s+");
String javaMethodName;
String javaAugmentedClassName;
// Based on the number of tokens, look up the Java method name and if provided the Java augmented class.
if (tokens.length == 2) {
javaMethodName = tokens[1];
javaAugmentedClassName = null;
} else if (tokens.length == 3) {
javaMethodName = tokens[2];
javaAugmentedClassName = tokens[1];
} else {
throw new IllegalArgumentException("invalid method definition: unexpected format [" + line + "]");
}
String painlessReturnTypeName = tokens[0];
// Parse the method parameters.
tokens = line.substring(parameterIndex + 1, line.length() - 1).replaceAll("\\s+", "").split(",");
// Handle the case for a method with no parameters.
if ("".equals(tokens[0])) {
tokens = new String[0];
}
whitelistMethods.add(new Whitelist.Method(origin, javaAugmentedClassName, javaMethodName,
painlessReturnTypeName, Arrays.asList(tokens)));
// Handle the case for a field definition.
// Expects the following format: ID ID '\n'
} else {
// Parse the field tokens.
String[] tokens = line.split("\\s+");
// Ensure the correct number of tokens.
if (tokens.length != 2) {
throw new IllegalArgumentException("invalid field definition: unexpected format [" + line + "]");
}
whitelistFields.add(new Whitelist.Field(origin, tokens[1], tokens[0]));
}
}
}
// Ensure all structs end with a '}' token before the end of the file.
if (painlessTypeName != null) {
throw new IllegalArgumentException("invalid struct definition: expected closing bracket");
}
} catch (Exception exception) {
throw new RuntimeException("error in [" + filepath + "] at line [" + number + "]", exception);
}
}
return new Whitelist(resource.getClassLoader(), whitelistStructs);
}
private WhitelistLoader() {}
}

View File

@ -36,8 +36,8 @@ class CharSequence -> java.lang.CharSequence {
IntStream chars()
IntStream codePoints()
int length()
String org.elasticsearch.painless.api.Augmentation.replaceAll(Pattern,Function)
String org.elasticsearch.painless.api.Augmentation.replaceFirst(Pattern,Function)
String org.elasticsearch.painless.api.Augmentation replaceAll(Pattern,Function)
String org.elasticsearch.painless.api.Augmentation replaceFirst(Pattern,Function)
CharSequence subSequence(int,int)
String toString()
}
@ -52,18 +52,18 @@ class Iterable -> java.lang.Iterable {
void forEach(Consumer)
Iterator iterator()
Spliterator spliterator()
# some adaptations of groovy methods
boolean org.elasticsearch.painless.api.Augmentation.any(Predicate)
Collection org.elasticsearch.painless.api.Augmentation.asCollection()
List org.elasticsearch.painless.api.Augmentation.asList()
def org.elasticsearch.painless.api.Augmentation.each(Consumer)
def org.elasticsearch.painless.api.Augmentation.eachWithIndex(ObjIntConsumer)
boolean org.elasticsearch.painless.api.Augmentation.every(Predicate)
List org.elasticsearch.painless.api.Augmentation.findResults(Function)
Map org.elasticsearch.painless.api.Augmentation.groupBy(Function)
String org.elasticsearch.painless.api.Augmentation.join(String)
double org.elasticsearch.painless.api.Augmentation.sum()
double org.elasticsearch.painless.api.Augmentation.sum(ToDoubleFunction)
# some adaptations of groovy wmethods
boolean org.elasticsearch.painless.api.Augmentation any(Predicate)
Collection org.elasticsearch.painless.api.Augmentation asCollection()
List org.elasticsearch.painless.api.Augmentation asList()
def org.elasticsearch.painless.api.Augmentation each(Consumer)
def org.elasticsearch.painless.api.Augmentation eachWithIndex(ObjIntConsumer)
boolean org.elasticsearch.painless.api.Augmentation every(Predicate)
List org.elasticsearch.painless.api.Augmentation findResults(Function)
Map org.elasticsearch.painless.api.Augmentation groupBy(Function)
String org.elasticsearch.painless.api.Augmentation join(String)
double org.elasticsearch.painless.api.Augmentation sum()
double org.elasticsearch.painless.api.Augmentation sum(ToDoubleFunction)
}
# Readable: i/o
@ -72,7 +72,7 @@ class Iterable -> java.lang.Iterable {
#### Classes
class Boolean -> java.lang.Boolean extends Comparable,Object {
class Boolean -> java.lang.Boolean {
Boolean TRUE
Boolean FALSE
boolean booleanValue()
@ -87,7 +87,7 @@ class Boolean -> java.lang.Boolean extends Comparable,Object {
Boolean valueOf(boolean)
}
class Byte -> java.lang.Byte extends Number,Comparable,Object {
class Byte -> java.lang.Byte {
int BYTES
byte MAX_VALUE
byte MIN_VALUE
@ -105,7 +105,7 @@ class Byte -> java.lang.Byte extends Number,Comparable,Object {
Byte valueOf(String,int)
}
class Character -> java.lang.Character extends Comparable,Object {
class Character -> java.lang.Character {
int BYTES
byte COMBINING_SPACING_MARK
byte CONNECTOR_PUNCTUATION
@ -226,10 +226,10 @@ class Character -> java.lang.Character extends Comparable,Object {
Character valueOf(char)
}
class Character.Subset -> java.lang.Character$Subset extends Object {
class Character.Subset -> java.lang.Character$Subset {
}
class Character.UnicodeBlock -> java.lang.Character$UnicodeBlock extends Character.Subset,Object {
class Character.UnicodeBlock -> 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 extends Charact
# ClassValue: ...
# Compiler: ...
class Double -> java.lang.Double extends Number,Comparable,Object {
class Double -> java.lang.Double {
int BYTES
int MAX_EXPONENT
double MAX_VALUE
@ -490,13 +490,13 @@ class Double -> java.lang.Double extends Number,Comparable,Object {
Double valueOf(double)
}
class Enum -> java.lang.Enum extends Comparable,Object {
class Enum -> java.lang.Enum {
int compareTo(Enum)
String name();
int ordinal();
String name()
int ordinal()
}
class Float -> java.lang.Float extends Number,Comparable,Object {
class Float -> java.lang.Float {
int BYTES
int MAX_EXPONENT
float MAX_VALUE
@ -529,7 +529,7 @@ class Float -> java.lang.Float extends Number,Comparable,Object {
# InheritableThreadLocal: threads
class Integer -> java.lang.Integer extends Number,Comparable,Object {
class Integer -> java.lang.Integer {
int BYTES
int MAX_VALUE
int MIN_VALUE
@ -569,7 +569,7 @@ class Integer -> java.lang.Integer extends Number,Comparable,Object {
Integer valueOf(String,int)
}
class Long -> java.lang.Long extends Number,Comparable,Object {
class Long -> java.lang.Long {
int BYTES
long MAX_VALUE
long MIN_VALUE
@ -609,7 +609,7 @@ class Long -> java.lang.Long extends Number,Comparable,Object {
Long valueOf(String,int)
}
class Math -> java.lang.Math extends Object {
class Math -> java.lang.Math {
double E
double PI
double abs(double)
@ -651,7 +651,7 @@ class Math -> java.lang.Math extends Object {
double ulp(double)
}
class Number -> java.lang.Number extends Object {
class Number -> java.lang.Number {
byte byteValue()
short shortValue()
int intValue()
@ -674,7 +674,7 @@ class Object -> java.lang.Object {
# RuntimePermission: skipped
# SecurityManger: skipped
class Short -> java.lang.Short extends Number,Comparable,Object {
class Short -> java.lang.Short {
int BYTES
short MAX_VALUE
short MIN_VALUE
@ -693,8 +693,8 @@ class Short -> java.lang.Short extends Number,Comparable,Object {
Short valueOf(String,int)
}
class StackTraceElement -> java.lang.StackTraceElement extends Object {
StackTraceElement <init>(String,String,String,int)
class StackTraceElement -> java.lang.StackTraceElement {
(String,String,String,int)
String getClassName()
String getFileName()
int getLineNumber()
@ -702,7 +702,7 @@ class StackTraceElement -> java.lang.StackTraceElement extends Object {
boolean isNativeMethod()
}
class StrictMath -> java.lang.StrictMath extends Object {
class StrictMath -> java.lang.StrictMath {
double E
double PI
double abs(double)
@ -744,8 +744,8 @@ class StrictMath -> java.lang.StrictMath extends Object {
double ulp(double)
}
class String -> java.lang.String extends CharSequence,Comparable,Object {
String <init>()
class String -> java.lang.String {
()
int codePointAt(int)
int codePointBefore(int)
int codePointCount(int,int)
@ -756,8 +756,8 @@ class String -> java.lang.String extends CharSequence,Comparable,Object {
boolean contentEquals(CharSequence)
String copyValueOf(char[])
String copyValueOf(char[],int,int)
String org.elasticsearch.painless.api.Augmentation.decodeBase64()
String org.elasticsearch.painless.api.Augmentation.encodeBase64()
String org.elasticsearch.painless.api.Augmentation decodeBase64()
String org.elasticsearch.painless.api.Augmentation encodeBase64()
boolean endsWith(String)
boolean equalsIgnoreCase(String)
String format(Locale,String,def[])
@ -786,9 +786,9 @@ class String -> java.lang.String extends CharSequence,Comparable,Object {
String valueOf(def)
}
class StringBuffer -> java.lang.StringBuffer extends CharSequence,Appendable,Object {
StringBuffer <init>()
StringBuffer <init>(CharSequence)
class StringBuffer -> java.lang.StringBuffer {
()
(CharSequence)
StringBuffer append(def)
StringBuffer append(CharSequence,int,int)
StringBuffer appendCodePoint(int)
@ -813,9 +813,9 @@ class StringBuffer -> java.lang.StringBuffer extends CharSequence,Appendable,Obj
String substring(int,int)
}
class StringBuilder -> java.lang.StringBuilder extends CharSequence,Appendable,Object {
StringBuilder <init>()
StringBuilder <init>(CharSequence)
class StringBuilder -> java.lang.StringBuilder {
()
(CharSequence)
StringBuilder append(def)
StringBuilder append(CharSequence,int,int)
StringBuilder appendCodePoint(int)
@ -840,7 +840,7 @@ class StringBuilder -> java.lang.StringBuilder extends CharSequence,Appendable,O
String substring(int,int)
}
class System -> java.lang.System extends Object {
class System -> java.lang.System {
void arraycopy(Object,int,Object,int,int)
long currentTimeMillis()
long nanoTime()
@ -851,12 +851,12 @@ class System -> java.lang.System extends Object {
# ThreadLocal: skipped
# Throwable: skipped (reserved for painless, users can only catch Exceptions)
class Void -> java.lang.Void extends Object {
class Void -> java.lang.Void {
}
#### Enums
class Character.UnicodeScript -> java.lang.Character$UnicodeScript extends Enum,Object {
class Character.UnicodeScript -> java.lang.Character$UnicodeScript {
Character.UnicodeScript ARABIC
Character.UnicodeScript ARMENIAN
Character.UnicodeScript AVESTAN
@ -968,138 +968,138 @@ class Character.UnicodeScript -> java.lang.Character$UnicodeScript extends Enum,
#### Exceptions
class ArithmeticException -> java.lang.ArithmeticException extends RuntimeException,Exception,Object {
ArithmeticException <init>()
ArithmeticException <init>(String)
class ArithmeticException -> java.lang.ArithmeticException {
()
(String)
}
class ArrayIndexOutOfBoundsException -> java.lang.ArrayIndexOutOfBoundsException extends IndexOutOfBoundsException,RuntimeException,Exception,Object {
ArrayIndexOutOfBoundsException <init>()
ArrayIndexOutOfBoundsException <init>(String)
class ArrayIndexOutOfBoundsException -> java.lang.ArrayIndexOutOfBoundsException {
()
(String)
}
class ArrayStoreException -> java.lang.ArrayStoreException extends RuntimeException,Exception,Object {
ArrayStoreException <init>()
ArrayStoreException <init>(String)
class ArrayStoreException -> java.lang.ArrayStoreException {
()
(String)
}
class ClassCastException -> java.lang.ClassCastException extends RuntimeException,Exception,Object {
ClassCastException <init>()
ClassCastException <init>(String)
class ClassCastException -> java.lang.ClassCastException {
()
(String)
}
class ClassNotFoundException -> java.lang.ClassNotFoundException extends ReflectiveOperationException,Exception,Object {
ClassNotFoundException <init>()
ClassNotFoundException <init>(String)
class ClassNotFoundException -> java.lang.ClassNotFoundException {
()
(String)
}
class CloneNotSupportedException -> java.lang.CloneNotSupportedException extends Exception,Object {
CloneNotSupportedException <init>()
CloneNotSupportedException <init>(String)
class CloneNotSupportedException -> java.lang.CloneNotSupportedException {
()
(String)
}
class EnumConstantNotPresentException -> java.lang.EnumConstantNotPresentException extends RuntimeException,Exception,Object {
class EnumConstantNotPresentException -> java.lang.EnumConstantNotPresentException {
String constantName()
}
class Exception -> java.lang.Exception extends Object {
Exception <init>()
Exception <init>(String)
class Exception -> java.lang.Exception {
()
(String)
String getLocalizedMessage()
String getMessage()
StackTraceElement[] getStackTrace()
}
class IllegalAccessException -> java.lang.IllegalAccessException extends ReflectiveOperationException,Exception,Object {
IllegalAccessException <init>()
IllegalAccessException <init>(String)
class IllegalAccessException -> java.lang.IllegalAccessException {
()
(String)
}
class IllegalArgumentException -> java.lang.IllegalArgumentException extends RuntimeException,Exception,Object {
IllegalArgumentException <init>()
IllegalArgumentException <init>(String)
class IllegalArgumentException -> java.lang.IllegalArgumentException {
()
(String)
}
class IllegalMonitorStateException -> java.lang.IllegalMonitorStateException extends RuntimeException,Exception,Object {
IllegalMonitorStateException <init>()
IllegalMonitorStateException <init>(String)
class IllegalMonitorStateException -> java.lang.IllegalMonitorStateException {
()
(String)
}
class IllegalStateException -> java.lang.IllegalStateException extends RuntimeException,Exception,Object {
IllegalStateException <init>()
IllegalStateException <init>(String)
class IllegalStateException -> java.lang.IllegalStateException {
()
(String)
}
class IllegalThreadStateException -> java.lang.IllegalThreadStateException extends IllegalArgumentException,RuntimeException,Exception,Object {
IllegalThreadStateException <init>()
IllegalThreadStateException <init>(String)
class IllegalThreadStateException -> java.lang.IllegalThreadStateException {
()
(String)
}
class IndexOutOfBoundsException -> java.lang.IndexOutOfBoundsException extends RuntimeException,Exception,Object {
IndexOutOfBoundsException <init>()
IndexOutOfBoundsException <init>(String)
class IndexOutOfBoundsException -> java.lang.IndexOutOfBoundsException {
()
(String)
}
class InstantiationException -> java.lang.InstantiationException extends ReflectiveOperationException,Exception,Object {
InstantiationException <init>()
InstantiationException <init>(String)
class InstantiationException -> java.lang.InstantiationException {
()
(String)
}
class InterruptedException -> java.lang.InterruptedException extends Exception,Object {
InterruptedException <init>()
InterruptedException <init>(String)
class InterruptedException -> java.lang.InterruptedException {
()
(String)
}
class NegativeArraySizeException -> java.lang.NegativeArraySizeException extends RuntimeException,Exception,Object {
NegativeArraySizeException <init>()
NegativeArraySizeException <init>(String)
class NegativeArraySizeException -> java.lang.NegativeArraySizeException {
()
(String)
}
class NoSuchFieldException -> java.lang.NoSuchFieldException extends ReflectiveOperationException,Exception,Object {
NoSuchFieldException <init>()
NoSuchFieldException <init>(String)
class NoSuchFieldException -> java.lang.NoSuchFieldException {
()
(String)
}
class NoSuchMethodException -> java.lang.NoSuchMethodException extends ReflectiveOperationException,Exception,Object {
NoSuchMethodException <init>()
NoSuchMethodException <init>(String)
class NoSuchMethodException -> java.lang.NoSuchMethodException {
()
(String)
}
class NullPointerException -> java.lang.NullPointerException extends RuntimeException,Exception,Object {
NullPointerException <init>()
NullPointerException <init>(String)
class NullPointerException -> java.lang.NullPointerException {
()
(String)
}
class NumberFormatException -> java.lang.NumberFormatException extends RuntimeException,Exception,Object {
NumberFormatException <init>()
NumberFormatException <init>(String)
class NumberFormatException -> java.lang.NumberFormatException {
()
(String)
}
class ReflectiveOperationException -> java.lang.ReflectiveOperationException extends Exception,Object {
ReflectiveOperationException <init>()
ReflectiveOperationException <init>(String)
class ReflectiveOperationException -> java.lang.ReflectiveOperationException {
()
(String)
}
class RuntimeException -> java.lang.RuntimeException extends Exception,Object {
RuntimeException <init>()
RuntimeException <init>(String)
class RuntimeException -> java.lang.RuntimeException {
()
(String)
}
class SecurityException -> java.lang.SecurityException extends RuntimeException,Exception,Object {
SecurityException <init>()
SecurityException <init>(String)
class SecurityException -> java.lang.SecurityException {
()
(String)
}
class StringIndexOutOfBoundsException -> java.lang.StringIndexOutOfBoundsException extends IndexOutOfBoundsException,RuntimeException,Exception,Object {
StringIndexOutOfBoundsException <init>()
StringIndexOutOfBoundsException <init>(String)
class StringIndexOutOfBoundsException -> java.lang.StringIndexOutOfBoundsException {
()
(String)
}
class TypeNotPresentException -> java.lang.TypeNotPresentException extends RuntimeException,Exception,Object {
class TypeNotPresentException -> java.lang.TypeNotPresentException {
String typeName()
}
class UnsupportedOperationException -> java.lang.UnsupportedOperationException extends RuntimeException,Exception,Object {
UnsupportedOperationException <init>()
UnsupportedOperationException <init>(String)
class UnsupportedOperationException -> java.lang.UnsupportedOperationException {
()
(String)
}

View File

@ -24,12 +24,12 @@
#### Classes
class BigDecimal -> java.math.BigDecimal extends Number,Comparable,Object {
class BigDecimal -> java.math.BigDecimal {
BigDecimal ONE
BigDecimal TEN
BigDecimal ZERO
BigDecimal <init>(String)
BigDecimal <init>(String,MathContext)
(String)
(String,MathContext)
BigDecimal abs()
BigDecimal abs(MathContext)
BigDecimal add(BigDecimal)
@ -77,12 +77,12 @@ class BigDecimal -> java.math.BigDecimal extends Number,Comparable,Object {
BigDecimal valueOf(double)
}
class BigInteger -> java.math.BigInteger extends Number,Comparable,Object {
class BigInteger -> java.math.BigInteger {
BigInteger ONE
BigInteger TEN
BigInteger ZERO
BigInteger <init>(String)
BigInteger <init>(String,int)
(String)
(String,int)
BigInteger abs()
BigInteger add(BigInteger)
BigInteger and(BigInteger)
@ -123,20 +123,20 @@ class BigInteger -> java.math.BigInteger extends Number,Comparable,Object {
BigInteger xor(BigInteger)
}
class MathContext -> java.math.MathContext extends Object {
class MathContext -> java.math.MathContext {
MathContext DECIMAL128
MathContext DECIMAL32
MathContext DECIMAL64
MathContext UNLIMITED
MathContext <init>(int)
MathContext <init>(int,RoundingMode)
(int)
(int,RoundingMode)
int getPrecision()
RoundingMode getRoundingMode()
}
#### Enums
class RoundingMode -> java.math.RoundingMode extends Enum,Object {
class RoundingMode -> java.math.RoundingMode {
RoundingMode CEILING
RoundingMode DOWN
RoundingMode FLOOR

View File

@ -24,7 +24,7 @@
#### Interfaces
class AttributedCharacterIterator -> java.text.AttributedCharacterIterator extends CharacterIterator {
class AttributedCharacterIterator -> java.text.AttributedCharacterIterator {
Set getAllAttributeKeys()
def getAttribute(AttributedCharacterIterator.Attribute)
Map getAttributes()
@ -50,20 +50,20 @@ class CharacterIterator -> java.text.CharacterIterator {
#### Classes
class Annotation -> java.text.Annotation extends Object {
Annotation <init>(Object)
class Annotation -> java.text.Annotation {
(Object)
def getValue()
}
class AttributedCharacterIterator.Attribute -> java.text.AttributedCharacterIterator$Attribute extends Object {
class AttributedCharacterIterator.Attribute -> java.text.AttributedCharacterIterator$Attribute {
AttributedCharacterIterator.Attribute INPUT_METHOD_SEGMENT
AttributedCharacterIterator.Attribute LANGUAGE
AttributedCharacterIterator.Attribute READING
}
class AttributedString -> java.text.AttributedString extends Object {
AttributedString <init>(String)
AttributedString <init>(String,Map)
class AttributedString -> java.text.AttributedString {
(String)
(String,Map)
void addAttribute(AttributedCharacterIterator.Attribute,Object)
void addAttribute(AttributedCharacterIterator.Attribute,Object,int,int)
void addAttributes(Map,int,int)
@ -72,14 +72,14 @@ class AttributedString -> java.text.AttributedString extends Object {
AttributedCharacterIterator getIterator(AttributedCharacterIterator.Attribute[],int,int)
}
class Bidi -> java.text.Bidi extends Object {
class Bidi -> java.text.Bidi {
int DIRECTION_DEFAULT_LEFT_TO_RIGHT
int DIRECTION_DEFAULT_RIGHT_TO_LEFT
int DIRECTION_LEFT_TO_RIGHT
int DIRECTION_RIGHT_TO_LEFT
Bidi <init>(AttributedCharacterIterator)
Bidi <init>(char[],int,byte[],int,int,int)
Bidi <init>(String,int)
(AttributedCharacterIterator)
(char[],int,byte[],int,int,int)
(String,int)
boolean baseIsLeftToRight()
Bidi createLineBidi(int,int)
int getBaseLevel()
@ -96,7 +96,7 @@ class Bidi -> java.text.Bidi extends Object {
boolean requiresBidi(char[],int,int)
}
class BreakIterator -> java.text.BreakIterator extend Object {
class BreakIterator -> java.text.BreakIterator {
int DONE
def clone()
int current()
@ -121,9 +121,9 @@ class BreakIterator -> java.text.BreakIterator extend Object {
void setText(String)
}
class ChoiceFormat -> java.text.ChoiceFormat extends NumberFormat,Format,Object {
ChoiceFormat <init>(double[],String[])
ChoiceFormat <init>(String)
class ChoiceFormat -> java.text.ChoiceFormat {
(double[],String[])
(String)
void applyPattern(String)
def[] getFormats()
double[] getLimits()
@ -134,7 +134,7 @@ class ChoiceFormat -> java.text.ChoiceFormat extends NumberFormat,Format,Object
String toPattern()
}
class CollationElementIterator -> java.text.CollationElementIterator extends Object {
class CollationElementIterator -> java.text.CollationElementIterator {
int NULLORDER
int getMaxExpansion(int)
int getOffset()
@ -148,13 +148,13 @@ class CollationElementIterator -> java.text.CollationElementIterator extends Obj
short tertiaryOrder(int)
}
class CollationKey -> java.text.CollationKey extends Comparable,Object {
class CollationKey -> java.text.CollationKey {
int compareTo(CollationKey)
String getSourceString()
byte[] toByteArray()
}
class Collator -> java.text.Collator extends Comparator,Object {
class Collator -> java.text.Collator {
int CANONICAL_DECOMPOSITION
int FULL_DECOMPOSITION
int IDENTICAL
@ -174,7 +174,7 @@ class Collator -> java.text.Collator extends Comparator,Object {
void setStrength(int)
}
class DateFormat -> java.text.DateFormat extends Format,Object {
class DateFormat -> java.text.DateFormat {
int AM_PM_FIELD
int DATE_FIELD
int DAY_OF_WEEK_FIELD
@ -221,7 +221,7 @@ class DateFormat -> java.text.DateFormat extends Format,Object {
void setTimeZone(TimeZone)
}
class DateFormat.Field -> java.text.DateFormat$Field extends Format.Field,AttributedCharacterIterator.Attribute,Object {
class DateFormat.Field -> java.text.DateFormat$Field {
DateFormat.Field AM_PM
DateFormat.Field DAY_OF_MONTH
DateFormat.Field DAY_OF_WEEK
@ -244,9 +244,9 @@ class DateFormat.Field -> java.text.DateFormat$Field extends Format.Field,Attrib
DateFormat.Field ofCalendarField(int)
}
class DateFormatSymbols -> java.text.DateFormatSymbols extends Object {
DateFormatSymbols <init>()
DateFormatSymbols <init>(Locale)
class DateFormatSymbols -> java.text.DateFormatSymbols {
()
(Locale)
def clone()
String[] getAmPmStrings()
Locale[] getAvailableLocales()
@ -270,10 +270,10 @@ class DateFormatSymbols -> java.text.DateFormatSymbols extends Object {
void setZoneStrings(String[][])
}
class DecimalFormat -> java.text.DecimalFormat extends NumberFormat,Format,Object {
DecimalFormat <init>()
DecimalFormat <init>(String)
DecimalFormat <init>(String,DecimalFormatSymbols)
class DecimalFormat -> java.text.DecimalFormat {
()
(String)
(String,DecimalFormatSymbols)
void applyLocalizedPattern(String)
void applyPattern(String)
DecimalFormatSymbols getDecimalFormatSymbols()
@ -298,9 +298,9 @@ class DecimalFormat -> java.text.DecimalFormat extends NumberFormat,Format,Objec
String toPattern()
}
class DecimalFormatSymbols -> java.text.DecimalFormatSymbols extends Object {
DecimalFormatSymbols <init>()
DecimalFormatSymbols <init>(Locale)
class DecimalFormatSymbols -> java.text.DecimalFormatSymbols {
()
(Locale)
def clone()
Locale[] getAvailableLocales()
Currency getCurrency()
@ -337,9 +337,9 @@ class DecimalFormatSymbols -> java.text.DecimalFormatSymbols extends Object {
void setZeroDigit(char)
}
class FieldPosition -> java.text.FieldPosition extends Object {
FieldPosition <init>(int)
FieldPosition <init>(Format.Field,int)
class FieldPosition -> java.text.FieldPosition {
(int)
(Format.Field,int)
int getBeginIndex()
int getEndIndex()
int getField()
@ -348,7 +348,7 @@ class FieldPosition -> java.text.FieldPosition extends Object {
void setEndIndex(int)
}
class Format -> java.text.Format extends Object {
class Format -> java.text.Format {
def clone()
String format(Object)
StringBuffer format(Object,StringBuffer,FieldPosition)
@ -357,10 +357,10 @@ class Format -> java.text.Format extends Object {
Object parseObject(String,ParsePosition)
}
class Format.Field -> java.text.Format$Field extends AttributedCharacterIterator.Attribute,Object {
class Format.Field -> java.text.Format$Field {
}
class MessageFormat -> java.text.MessageFormat extends Format,Object {
class MessageFormat -> java.text.MessageFormat {
void applyPattern(String)
String format(String,Object[])
Format[] getFormats()
@ -376,16 +376,16 @@ class MessageFormat -> java.text.MessageFormat extends Format,Object {
String toPattern()
}
class MessageFormat.Field -> java.text.MessageFormat$Field extends Format.Field,AttributedCharacterIterator.Attribute,Object {
class MessageFormat.Field -> java.text.MessageFormat$Field {
MessageFormat.Field ARGUMENT
}
class Normalizer -> java.text.Normalizer extends Object {
class Normalizer -> java.text.Normalizer {
boolean isNormalized(CharSequence,Normalizer.Form)
String normalize(CharSequence,Normalizer.Form)
}
class NumberFormat -> java.text.NumberFormat extends Format,Object {
class NumberFormat -> java.text.NumberFormat {
int FRACTION_FIELD
int INTEGER_FIELD
Locale[] getAvailableLocales()
@ -419,7 +419,7 @@ class NumberFormat -> java.text.NumberFormat extends Format,Object {
void setRoundingMode(RoundingMode)
}
class NumberFormat.Field -> java.text.NumberFormat$Field extends Format.Field,AttributedCharacterIterator.Attribute,Object {
class NumberFormat.Field -> java.text.NumberFormat$Field {
NumberFormat.Field CURRENCY
NumberFormat.Field DECIMAL_SEPARATOR
NumberFormat.Field EXPONENT
@ -433,24 +433,24 @@ class NumberFormat.Field -> java.text.NumberFormat$Field extends Format.Field,At
NumberFormat.Field SIGN
}
class ParsePosition -> java.text.ParsePosition extends Object {
ParsePosition <init>(int)
class ParsePosition -> java.text.ParsePosition {
(int)
int getErrorIndex()
int getIndex()
void setErrorIndex(int)
void setIndex(int)
}
class RuleBasedCollator -> java.text.RuleBasedCollator extends Collator,Comparator,Object {
RuleBasedCollator <init>(String)
class RuleBasedCollator -> java.text.RuleBasedCollator {
(String)
CollationElementIterator getCollationElementIterator(String)
String getRules()
}
class SimpleDateFormat -> java.text.SimpleDateFormat extends DateFormat,Format,Object {
SimpleDateFormat <init>()
SimpleDateFormat <init>(String)
SimpleDateFormat <init>(String,Locale)
class SimpleDateFormat -> java.text.SimpleDateFormat {
()
(String)
(String,Locale)
void applyLocalizedPattern(String)
void applyPattern(String)
Date get2DigitYearStart()
@ -461,16 +461,16 @@ class SimpleDateFormat -> java.text.SimpleDateFormat extends DateFormat,Format,O
String toPattern()
}
class StringCharacterIterator -> java.text.StringCharacterIterator extends CharacterIterator,Object {
StringCharacterIterator <init>(String)
StringCharacterIterator <init>(String,int)
StringCharacterIterator <init>(String,int,int,int)
class StringCharacterIterator -> java.text.StringCharacterIterator {
(String)
(String,int)
(String,int,int,int)
void setText(String)
}
#### Enums
class Normalizer.Form -> java.text.Normalizer$Form extends Enum,Object {
class Normalizer.Form -> java.text.Normalizer$Form {
Normalizer.Form NFC
Normalizer.Form NFD
Normalizer.Form NFKC
@ -481,7 +481,7 @@ class Normalizer.Form -> java.text.Normalizer$Form extends Enum,Object {
#### Exceptions
class ParseException -> java.text.ParseException extends Exception,Object {
ParseException <init>(String,int)
class ParseException -> java.text.ParseException {
(String,int)
int getErrorOffset()
}

View File

@ -24,7 +24,7 @@
#### Interfaces
class ChronoLocalDate -> java.time.chrono.ChronoLocalDate extends Temporal,TemporalAccessor,TemporalAdjuster,Comparable {
class ChronoLocalDate -> java.time.chrono.ChronoLocalDate {
ChronoLocalDateTime atTime(LocalTime)
int compareTo(ChronoLocalDate)
boolean equals(Object)
@ -51,7 +51,7 @@ class ChronoLocalDate -> java.time.chrono.ChronoLocalDate extends Temporal,Tempo
ChronoLocalDate with(TemporalField,long)
}
class ChronoLocalDateTime -> java.time.chrono.ChronoLocalDateTime extends Temporal,TemporalAccessor,TemporalAdjuster,Comparable {
class ChronoLocalDateTime -> java.time.chrono.ChronoLocalDateTime {
ChronoZonedDateTime atZone(ZoneId)
int compareTo(ChronoLocalDateTime)
boolean equals(Object)
@ -76,7 +76,7 @@ class ChronoLocalDateTime -> java.time.chrono.ChronoLocalDateTime extends Tempor
ChronoLocalDateTime with(TemporalField,long)
}
class Chronology -> java.time.chrono.Chronology extends Comparable {
class Chronology -> 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 extends Comparable {
ChronoZonedDateTime zonedDateTime(Instant,ZoneId)
}
class ChronoPeriod -> java.time.chrono.ChronoPeriod extends TemporalAmount {
class ChronoPeriod -> java.time.chrono.ChronoPeriod {
ChronoPeriod between(ChronoLocalDate,ChronoLocalDate)
boolean equals(Object)
Chronology getChronology()
@ -122,7 +122,7 @@ class ChronoPeriod -> java.time.chrono.ChronoPeriod extends TemporalAmount {
String toString()
}
class ChronoZonedDateTime -> java.time.chrono.ChronoZonedDateTime extends Temporal,TemporalAccessor,Comparable {
class ChronoZonedDateTime -> java.time.chrono.ChronoZonedDateTime {
int compareTo(ChronoZonedDateTime)
boolean equals(Object)
String format(DateTimeFormatter)
@ -153,17 +153,17 @@ class ChronoZonedDateTime -> java.time.chrono.ChronoZonedDateTime extends Tempor
ChronoZonedDateTime withZoneSameInstant(ZoneId)
}
class Era -> java.time.chrono.Era extends TemporalAccessor,TemporalAdjuster {
class Era -> java.time.chrono.Era {
String getDisplayName(TextStyle,Locale)
int getValue()
}
#### Classes
class AbstractChronology -> java.time.chrono.Chronology extends Chronology,Comparable,Object {
class AbstractChronology -> java.time.chrono.AbstractChronology {
}
class HijrahChronology -> java.time.chrono.HijrahChronology extends AbstractChronology,Chronology,Comparable,Object {
class HijrahChronology -> java.time.chrono.HijrahChronology {
HijrahChronology INSTANCE
HijrahDate date(TemporalAccessor)
HijrahDate date(int,int,int)
@ -175,7 +175,7 @@ class HijrahChronology -> java.time.chrono.HijrahChronology extends AbstractChro
HijrahDate resolveDate(Map,ResolverStyle)
}
class HijrahDate -> java.time.chrono.HijrahDate extends ChronoLocalDate,Temporal,TemporalAccessor,TemporalAdjuster,Comparable,Object {
class HijrahDate -> java.time.chrono.HijrahDate {
HijrahDate from(TemporalAccessor)
HijrahChronology getChronology()
HijrahEra getEra()
@ -189,7 +189,7 @@ class HijrahDate -> java.time.chrono.HijrahDate extends ChronoLocalDate,Temporal
HijrahDate withVariant(HijrahChronology)
}
class IsoChronology -> java.time.chrono.IsoChronology extends AbstractChronology,Chronology,Comparable,Object {
class IsoChronology -> java.time.chrono.IsoChronology {
IsoChronology INSTANCE
LocalDate date(TemporalAccessor)
LocalDate date(int,int,int)
@ -205,7 +205,7 @@ class IsoChronology -> java.time.chrono.IsoChronology extends AbstractChronology
ZonedDateTime zonedDateTime(Instant,ZoneId)
}
class JapaneseChronology -> java.time.chrono.JapaneseChronology extends AbstractChronology,Chronology,Comparable,Object {
class JapaneseChronology -> java.time.chrono.JapaneseChronology {
JapaneseChronology INSTANCE
JapaneseDate date(TemporalAccessor)
JapaneseDate date(int,int,int)
@ -217,7 +217,7 @@ class JapaneseChronology -> java.time.chrono.JapaneseChronology extends Abstract
JapaneseDate resolveDate(Map,ResolverStyle)
}
class JapaneseDate -> java.time.chrono.JapaneseDate extends ChronoLocalDate,Temporal,TemporalAccessor,TemporalAdjuster,Comparable,Object {
class JapaneseDate -> java.time.chrono.JapaneseDate {
JapaneseDate of(int,int,int)
JapaneseDate from(TemporalAccessor)
JapaneseChronology getChronology()
@ -230,7 +230,7 @@ class JapaneseDate -> java.time.chrono.JapaneseDate extends ChronoLocalDate,Temp
JapaneseDate minus(long,TemporalUnit)
}
class JapaneseEra -> java.time.chrono.JapaneseEra extends Era,TemporalAccessor,TemporalAdjuster,Object {
class JapaneseEra -> java.time.chrono.JapaneseEra {
JapaneseEra HEISEI
JapaneseEra MEIJI
JapaneseEra SHOWA
@ -241,7 +241,7 @@ class JapaneseEra -> java.time.chrono.JapaneseEra extends Era,TemporalAccessor,T
JapaneseEra[] values()
}
class MinguoChronology -> java.time.chrono.MinguoChronology extends AbstractChronology,Chronology,Comparable,Object {
class MinguoChronology -> java.time.chrono.MinguoChronology {
MinguoChronology INSTANCE
MinguoDate date(TemporalAccessor)
MinguoDate date(int,int,int)
@ -253,7 +253,7 @@ class MinguoChronology -> java.time.chrono.MinguoChronology extends AbstractChro
MinguoDate resolveDate(Map,ResolverStyle)
}
class MinguoDate -> java.time.chrono.MinguoDate extends ChronoLocalDate,Temporal,TemporalAccessor,TemporalAdjuster,Comparable,Object {
class MinguoDate -> java.time.chrono.MinguoDate {
MinguoDate of(int,int,int)
MinguoDate from(TemporalAccessor)
MinguoChronology getChronology()
@ -266,7 +266,7 @@ class MinguoDate -> java.time.chrono.MinguoDate extends ChronoLocalDate,Temporal
MinguoDate minus(long,TemporalUnit)
}
class ThaiBuddhistChronology -> java.time.chrono.ThaiBuddhistChronology extends AbstractChronology,Chronology,Comparable,Object {
class ThaiBuddhistChronology -> java.time.chrono.ThaiBuddhistChronology {
ThaiBuddhistChronology INSTANCE
ThaiBuddhistDate date(TemporalAccessor)
ThaiBuddhistDate date(int,int,int)
@ -278,7 +278,7 @@ class ThaiBuddhistChronology -> java.time.chrono.ThaiBuddhistChronology extends
ThaiBuddhistDate resolveDate(Map,ResolverStyle)
}
class ThaiBuddhistDate -> java.time.chrono.ThaiBuddhistDate extends ChronoLocalDate,Temporal,TemporalAccessor,TemporalAdjuster,Comparable,Object {
class ThaiBuddhistDate -> java.time.chrono.ThaiBuddhistDate {
ThaiBuddhistDate of(int,int,int)
ThaiBuddhistDate from(TemporalAccessor)
ThaiBuddhistChronology getChronology()
@ -293,7 +293,7 @@ class ThaiBuddhistDate -> java.time.chrono.ThaiBuddhistDate extends ChronoLocalD
#### Enums
class HijrahEra -> java.time.chrono.HijrahEra extends Enum,Comparable,Era,TemporalAccessor,TemporalAdjuster,Object {
class HijrahEra -> java.time.chrono.HijrahEra {
HijrahEra AH
int getValue()
HijrahEra of(int)
@ -301,7 +301,7 @@ class HijrahEra -> java.time.chrono.HijrahEra extends Enum,Comparable,Era,Tempor
HijrahEra[] values()
}
class IsoEra -> java.time.chrono.IsoEra extends Enum,Comparable,Era,TemporalAccessor,TemporalAdjuster,Object {
class IsoEra -> java.time.chrono.IsoEra {
IsoEra BCE
IsoEra CE
int getValue()
@ -310,7 +310,7 @@ class IsoEra -> java.time.chrono.IsoEra extends Enum,Comparable,Era,TemporalAcce
IsoEra[] values()
}
class MinguoEra -> java.time.chrono.MinguoEra extends Enum,Comparable,Era,TemporalAccessor,TemporalAdjuster,Object {
class MinguoEra -> java.time.chrono.MinguoEra {
MinguoEra BEFORE_ROC
MinguoEra ROC
int getValue()
@ -319,7 +319,7 @@ class MinguoEra -> java.time.chrono.MinguoEra extends Enum,Comparable,Era,Tempor
MinguoEra[] values()
}
class ThaiBuddhistEra -> java.time.chrono.ThaiBuddhistEra extends Enum,Comparable,Era,TemporalAccessor,TemporalAdjuster,Object {
class ThaiBuddhistEra -> java.time.chrono.ThaiBuddhistEra {
ThaiBuddhistEra BE
ThaiBuddhistEra BEFORE_BE
int getValue()

View File

@ -24,7 +24,7 @@
#### Classes
class DateTimeFormatter -> java.time.format.DateTimeFormatter extends Object {
class DateTimeFormatter -> java.time.format.DateTimeFormatter {
DateTimeFormatter BASIC_ISO_DATE
DateTimeFormatter ISO_DATE
DateTimeFormatter ISO_DATE_TIME
@ -70,8 +70,8 @@ class DateTimeFormatter -> java.time.format.DateTimeFormatter extends Object {
DateTimeFormatter withZone(ZoneId)
}
class DateTimeFormatterBuilder -> java.time.format.DateTimeFormatterBuilder extends Object {
DateTimeFormatterBuilder <init>()
class DateTimeFormatterBuilder -> java.time.format.DateTimeFormatterBuilder {
()
DateTimeFormatterBuilder append(DateTimeFormatter)
DateTimeFormatterBuilder appendChronologyId()
DateTimeFormatterBuilder appendChronologyText(TextStyle)
@ -110,7 +110,7 @@ class DateTimeFormatterBuilder -> java.time.format.DateTimeFormatterBuilder exte
DateTimeFormatter toFormatter(Locale)
}
class DecimalStyle -> java.time.format.DecimalStyle extends Object {
class DecimalStyle -> java.time.format.DecimalStyle {
DecimalStyle STANDARD
Set getAvailableLocales()
char getDecimalSeparator()
@ -127,7 +127,7 @@ class DecimalStyle -> java.time.format.DecimalStyle extends Object {
#### Enums
class FormatStyle -> java.time.format.FormatStyle extends Enum,Comparable,Object {
class FormatStyle -> java.time.format.FormatStyle {
FormatStyle FULL
FormatStyle LONG
FormatStyle MEDIUM
@ -136,7 +136,7 @@ class FormatStyle -> java.time.format.FormatStyle extends Enum,Comparable,Object
FormatStyle[] values()
}
class ResolverStyle -> java.time.format.ResolverStyle extends Enum,Comparable,Object {
class ResolverStyle -> java.time.format.ResolverStyle {
ResolverStyle LENIENT
ResolverStyle SMART
ResolverStyle STRICT
@ -144,7 +144,7 @@ class ResolverStyle -> java.time.format.ResolverStyle extends Enum,Comparable,Ob
ResolverStyle[] values()
}
class SignStyle -> java.time.format.SignStyle extends Enum,Comparable,Object {
class SignStyle -> java.time.format.SignStyle {
SignStyle ALWAYS
SignStyle EXCEEDS_PAD
SignStyle NEVER
@ -154,7 +154,7 @@ class SignStyle -> java.time.format.SignStyle extends Enum,Comparable,Object {
SignStyle[] values()
}
class TextStyle -> java.time.format.TextStyle extends Enum,Comparable,Object {
class TextStyle -> java.time.format.TextStyle {
TextStyle FULL
TextStyle FULL_STANDALONE
TextStyle NARROW
@ -170,8 +170,8 @@ class TextStyle -> java.time.format.TextStyle extends Enum,Comparable,Object {
#### Exceptions
class DateTimeParseException -> java.time.format.DateTimeParseException extends DateTimeException,RuntimeException,Exception,Object {
DateTimeParseException <init>(String,CharSequence,int)
class DateTimeParseException -> java.time.format.DateTimeParseException {
(String,CharSequence,int)
int getErrorIndex()
String getParsedString()
}

View File

@ -24,7 +24,7 @@
#### Interfaces
class Temporal -> java.time.temporal.Temporal extends TemporalAccessor {
class Temporal -> java.time.temporal.Temporal {
Temporal minus(long,TemporalUnit)
Temporal minus(TemporalAmount)
Temporal plus(long,TemporalUnit)
@ -85,7 +85,7 @@ class TemporalUnit -> java.time.temporal.TemporalUnit {
#### Classes
class IsoFields -> java.time.temporal.IsoFields extends Object {
class IsoFields -> 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 extends Object {
TemporalField WEEK_OF_WEEK_BASED_YEAR
}
class JulianFields -> java.time.temporal.JulianFields extends Object {
class JulianFields -> java.time.temporal.JulianFields {
TemporalField JULIAN_DAY
TemporalField MODIFIED_JULIAN_DAY
TemporalField RATA_DIE
}
class TemporalAdjusters -> java.time.temporal.TemporalAdjusters extends Object {
class TemporalAdjusters -> java.time.temporal.TemporalAdjusters {
TemporalAdjuster dayOfWeekInMonth(int,DayOfWeek)
TemporalAdjuster firstDayOfMonth()
TemporalAdjuster firstDayOfNextMonth()
@ -117,7 +117,7 @@ class TemporalAdjusters -> java.time.temporal.TemporalAdjusters extends Object {
TemporalAdjuster previousOrSame(DayOfWeek)
}
class TemporalQueries -> java.time.temporal.TemporalQueries extends Object {
class TemporalQueries -> java.time.temporal.TemporalQueries {
TemporalQuery chronology()
TemporalQuery localDate()
TemporalQuery localTime()
@ -127,7 +127,7 @@ class TemporalQueries -> java.time.temporal.TemporalQueries extends Object {
TemporalQuery zoneId()
}
class ValueRange -> java.time.temporal.ValueRange extends Object {
class ValueRange -> java.time.temporal.ValueRange {
int checkValidIntValue(long,TemporalField)
long checkValidValue(long,TemporalField)
long getLargestMinimum()
@ -143,7 +143,7 @@ class ValueRange -> java.time.temporal.ValueRange extends Object {
ValueRange of(long,long,long,long)
}
class WeekFields -> java.time.temporal.WeekFields extends Object {
class WeekFields -> java.time.temporal.WeekFields {
WeekFields ISO
WeekFields SUNDAY_START
TemporalUnit WEEK_BASED_YEARS
@ -160,7 +160,7 @@ class WeekFields -> java.time.temporal.WeekFields extends Object {
#### Enums
class ChronoField -> java.time.temporal.ChronoField extends Enum,Comparable,TemporalField,Object {
class ChronoField -> 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 extends Enum,Comparable,Temp
ChronoField[] values()
}
class ChronoUnit -> java.time.temporal.ChronoUnit extends Enum,Comparable,TemporalUnit,Object {
class ChronoUnit -> java.time.temporal.ChronoUnit {
ChronoUnit CENTURIES
ChronoUnit DAYS
ChronoUnit DECADES
@ -220,6 +220,6 @@ class ChronoUnit -> java.time.temporal.ChronoUnit extends Enum,Comparable,Tempor
#### Exceptions
class UnsupportedTemporalTypeException -> java.time.temporal.UnsupportedTemporalTypeException extends DateTimeException,RuntimeException,Exception,Object {
UnsupportedTemporalTypeException <init>(String)
class UnsupportedTemporalTypeException -> java.time.temporal.UnsupportedTemporalTypeException {
(String)
}

View File

@ -24,7 +24,7 @@
#### Classes
class Clock -> java.time.Clock extends Object {
class Clock -> java.time.Clock {
Clock fixed(Instant,ZoneId)
ZoneId getZone()
Instant instant()
@ -33,7 +33,7 @@ class Clock -> java.time.Clock extends Object {
Clock tick(Clock,Duration)
}
class Duration -> java.time.Duration extends Comparable,TemporalAmount,Object {
class Duration -> java.time.Duration {
Duration ZERO
Duration abs()
Duration between(Temporal,Temporal)
@ -57,7 +57,7 @@ class Duration -> java.time.Duration extends Comparable,TemporalAmount,Object {
Duration of(long,TemporalUnit)
Duration ofDays(long)
Duration ofHours(long)
Duration ofMillis(long)
Duration ofMillis(long)
Duration ofMinutes(long)
Duration ofNanos(long)
Duration ofSeconds(long)
@ -80,7 +80,7 @@ class Duration -> java.time.Duration extends Comparable,TemporalAmount,Object {
Duration withNanos(int)
}
class Instant -> java.time.Instant extends Comparable,Temporal,TemporalAccessor,TemporalAdjuster,Object {
class Instant -> java.time.Instant {
Instant EPOCH
Instant MAX
Instant MIN
@ -112,7 +112,7 @@ class Instant -> java.time.Instant extends Comparable,Temporal,TemporalAccessor,
Instant with(TemporalField,long)
}
class LocalDate -> java.time.LocalDate extends ChronoLocalDate,Temporal,TemporalAccessor,TemporalAdjuster,Comparable,Object {
class LocalDate -> java.time.LocalDate {
LocalDate MAX
LocalDate MIN
LocalDateTime atStartOfDay()
@ -155,7 +155,7 @@ class LocalDate -> java.time.LocalDate extends ChronoLocalDate,Temporal,Temporal
LocalDate withYear(int)
}
class LocalDateTime -> java.time.LocalDateTime extends ChronoLocalDateTime,Temporal,TemporalAccessor,TemporalAdjuster,Comparable,Object {
class LocalDateTime -> java.time.LocalDateTime {
LocalDateTime MIN
LocalDateTime MAX
OffsetDateTime atOffset(ZoneOffset)
@ -212,7 +212,7 @@ class LocalDateTime -> java.time.LocalDateTime extends ChronoLocalDateTime,Tempo
LocalDateTime withYear(int)
}
class LocalTime -> java.time.LocalTime extends Temporal,TemporalAccessor,TemporalAdjuster,Comparable,Object {
class LocalTime -> java.time.LocalTime {
LocalTime MAX
LocalTime MIDNIGHT
LocalTime MIN
@ -258,7 +258,7 @@ class LocalTime -> java.time.LocalTime extends Temporal,TemporalAccessor,Tempora
LocalTime withSecond(int)
}
class MonthDay -> java.time.MonthDay extends TemporalAccessor,TemporalAdjuster,Comparable,Object {
class MonthDay -> java.time.MonthDay {
LocalDate atYear(int)
int compareTo(MonthDay)
String format(DateTimeFormatter)
@ -270,14 +270,14 @@ class MonthDay -> java.time.MonthDay extends TemporalAccessor,TemporalAdjuster,C
boolean isBefore(MonthDay)
boolean isValidYear(int)
MonthDay of(int,int)
MonthDay parse(CharSequence)
MonthDay parse(CharSequence)
MonthDay parse(CharSequence,DateTimeFormatter)
MonthDay with(Month)
MonthDay withDayOfMonth(int)
MonthDay withMonth(int)
}
class OffsetDateTime -> java.time.OffsetDateTime extends Temporal,TemporalAccessor,TemporalAdjuster,Comparable,Object {
class OffsetDateTime -> java.time.OffsetDateTime {
OffsetDateTime MAX
OffsetDateTime MIN
ZonedDateTime atZoneSameInstant(ZoneId)
@ -348,7 +348,7 @@ class OffsetDateTime -> java.time.OffsetDateTime extends Temporal,TemporalAccess
OffsetDateTime withOffsetSameInstant(ZoneOffset)
}
class OffsetTime -> java.time.OffsetTime extends Temporal,TemporalAccessor,TemporalAdjuster,Comparable,Object {
class OffsetTime -> java.time.OffsetTime {
OffsetTime MAX
OffsetTime MIN
int compareTo(OffsetTime)
@ -391,7 +391,7 @@ class OffsetTime -> java.time.OffsetTime extends Temporal,TemporalAccessor,Tempo
OffsetTime withSecond(int)
}
class Period -> java.time.Period extends ChronoPeriod,TemporalAmount,Object {
class Period -> java.time.Period {
Period ZERO
Period between(LocalDate,LocalDate)
Period from(TemporalAmount)
@ -422,7 +422,7 @@ class Period -> java.time.Period extends ChronoPeriod,TemporalAmount,Object {
Period withYears(int)
}
class Year -> java.time.Year extends Temporal,TemporalAccessor,TemporalAdjuster,Comparable,Object {
class Year -> java.time.Year {
int MAX_VALUE
int MIN_VALUE
LocalDate atDay(int)
@ -450,7 +450,7 @@ class Year -> java.time.Year extends Temporal,TemporalAccessor,TemporalAdjuster,
Year with(TemporalField,long)
}
class YearMonth -> java.time.YearMonth extends Temporal,TemporalAccessor,TemporalAdjuster,Comparable,Object {
class YearMonth -> java.time.YearMonth {
LocalDate atDay(int)
LocalDate atEndOfMonth()
int compareTo(YearMonth)
@ -482,7 +482,7 @@ class YearMonth -> java.time.YearMonth extends Temporal,TemporalAccessor,Tempora
YearMonth withMonth(int)
}
class ZonedDateTime -> java.time.ZonedDateTime extends ChronoZonedDateTime,Temporal,TemporalAccessor,Comparable,Object {
class ZonedDateTime -> java.time.ZonedDateTime {
int getDayOfMonth()
DayOfWeek getDayOfWeek()
int getDayOfYear()
@ -544,7 +544,7 @@ class ZonedDateTime -> java.time.ZonedDateTime extends ChronoZonedDateTime,Tempo
ZonedDateTime withZoneSameInstant(ZoneId)
}
class ZoneId -> java.time.ZoneId extends Object {
class ZoneId -> java.time.ZoneId {
Map SHORT_IDS
Set getAvailableZoneIds()
ZoneId of(String)
@ -558,7 +558,7 @@ class ZoneId -> java.time.ZoneId extends Object {
ZoneRules getRules()
}
class ZoneOffset -> java.time.ZoneOffset extends ZoneId,Object {
class ZoneOffset -> java.time.ZoneOffset {
ZoneOffset MAX
ZoneOffset MIN
ZoneOffset UTC
@ -573,7 +573,7 @@ class ZoneOffset -> java.time.ZoneOffset extends ZoneId,Object {
#### Enums
class DayOfWeek -> java.time.DayOfWeek extends Enum,TemporalAccessor,TemporalAdjuster,Comparable,Object {
class DayOfWeek -> java.time.DayOfWeek {
DayOfWeek FRIDAY
DayOfWeek MONDAY
DayOfWeek SATURDAY
@ -591,7 +591,7 @@ class DayOfWeek -> java.time.DayOfWeek extends Enum,TemporalAccessor,TemporalAdj
DayOfWeek[] values()
}
class Month -> java.time.Month extends Enum,TemporalAccessor,TemporalAdjuster,Comparable,Object {
class Month -> java.time.Month {
Month APRIL
Month AUGUST
Month DECEMBER
@ -621,7 +621,7 @@ class Month -> java.time.Month extends Enum,TemporalAccessor,TemporalAdjuster,Co
#### Exceptions
class DateTimeException -> java.time.DateTimeException extends RuntimeException,Exception,Object {
DateTimeException <init>(String)
class DateTimeException -> java.time.DateTimeException {
(String)
}

View File

@ -24,7 +24,7 @@
#### Classes
class ZoneOffsetTransition -> java.time.zone.ZoneOffsetTransition extends Comparable,Object {
class ZoneOffsetTransition -> java.time.zone.ZoneOffsetTransition {
int compareTo(ZoneOffsetTransition)
LocalDateTime getDateTimeAfter()
LocalDateTime getDateTimeBefore()
@ -39,7 +39,7 @@ class ZoneOffsetTransition -> java.time.zone.ZoneOffsetTransition extends Compar
long toEpochSecond()
}
class ZoneOffsetTransitionRule -> java.time.zone.ZoneOffsetTransitionRule extends Object {
class ZoneOffsetTransitionRule -> java.time.zone.ZoneOffsetTransitionRule {
ZoneOffsetTransition createTransition(int)
int getDayOfMonthIndicator()
DayOfWeek getDayOfWeek()
@ -53,7 +53,7 @@ class ZoneOffsetTransitionRule -> java.time.zone.ZoneOffsetTransitionRule extend
ZoneOffsetTransitionRule of(Month,int,DayOfWeek,LocalTime,boolean,ZoneOffsetTransitionRule.TimeDefinition,ZoneOffset,ZoneOffset,ZoneOffset)
}
class ZoneRules -> java.time.zone.ZoneRules extends Object {
class ZoneRules -> java.time.zone.ZoneRules {
Duration getDaylightSavings(Instant)
ZoneOffset getOffset(Instant)
ZoneOffset getStandardOffset(Instant)
@ -70,7 +70,7 @@ class ZoneRules -> java.time.zone.ZoneRules extends Object {
ZoneOffsetTransition previousTransition(Instant)
}
class ZoneRulesProvider -> java.time.zone.ZoneRulesProvider extends Object {
class ZoneRulesProvider -> java.time.zone.ZoneRulesProvider {
Set getAvailableZoneIds()
ZoneRules getRules(String,boolean)
NavigableMap getVersions(String)
@ -78,7 +78,7 @@ class ZoneRulesProvider -> java.time.zone.ZoneRulesProvider extends Object {
#### Enums
class ZoneOffsetTransitionRule.TimeDefinition -> java.time.zone.ZoneOffsetTransitionRule$TimeDefinition extends Enum,Comparable,Object {
class ZoneOffsetTransitionRule.TimeDefinition -> 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 extends DateTimeException,RuntimeException,Exception,Object {
ZoneRulesException <init>(String)
class ZoneRulesException -> java.time.zone.ZoneRulesException {
(String)
}

View File

@ -21,7 +21,6 @@
# Painless definition file. This defines the hierarchy of classes,
# what methods and fields they have, etc.
#
#### Interfaces
class BiConsumer -> java.util.function.BiConsumer {
@ -34,7 +33,7 @@ class BiFunction -> java.util.function.BiFunction {
def apply(def,def)
}
class BinaryOperator -> java.util.function.BinaryOperator extends BiFunction {
class BinaryOperator -> java.util.function.BinaryOperator {
BinaryOperator maxBy(Comparator)
BinaryOperator minBy(Comparator)
}
@ -227,6 +226,6 @@ class ToLongFunction -> java.util.function.ToLongFunction {
long applyAsLong(def)
}
class UnaryOperator -> java.util.function.UnaryOperator extends Function {
class UnaryOperator -> java.util.function.UnaryOperator {
UnaryOperator identity()
}

View File

@ -22,7 +22,7 @@
# what methods and fields they have, etc.
#
class Pattern -> java.util.regex.Pattern extends Object {
class Pattern -> 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,14 +35,14 @@ class Pattern -> java.util.regex.Pattern extends Object {
Stream splitAsStream(CharSequence)
}
class Matcher -> java.util.regex.Matcher extends Object {
class Matcher -> java.util.regex.Matcher {
int end()
int end(int)
boolean find()
boolean find(int)
String group()
String group(int)
String org.elasticsearch.painless.api.Augmentation.namedGroup(String)
String org.elasticsearch.painless.api.Augmentation namedGroup(String)
int groupCount()
boolean hasAnchoringBounds()
boolean hasTransparentBounds()

View File

@ -43,7 +43,7 @@ class Collector -> java.util.stream.Collector {
Supplier supplier()
}
class DoubleStream -> java.util.stream.DoubleStream extends BaseStream {
class DoubleStream -> java.util.stream.DoubleStream {
boolean allMatch(DoublePredicate)
boolean anyMatch(DoublePredicate)
OptionalDouble average()
@ -82,12 +82,12 @@ class DoubleStream -> java.util.stream.DoubleStream extends BaseStream {
double[] toArray()
}
class DoubleStream.Builder -> java.util.stream.DoubleStream$Builder extends DoubleConsumer {
class DoubleStream.Builder -> java.util.stream.DoubleStream$Builder {
DoubleStream.Builder add(double)
DoubleStream build()
}
class IntStream -> java.util.stream.IntStream extends BaseStream {
class IntStream -> java.util.stream.IntStream {
boolean allMatch(IntPredicate)
boolean anyMatch(IntPredicate)
DoubleStream asDoubleStream()
@ -130,12 +130,12 @@ class IntStream -> java.util.stream.IntStream extends BaseStream {
int[] toArray()
}
class IntStream.Builder -> java.util.stream.IntStream$Builder extends IntConsumer {
class IntStream.Builder -> java.util.stream.IntStream$Builder {
IntStream.Builder add(int)
IntStream build()
}
class LongStream -> java.util.stream.LongStream extends BaseStream {
class LongStream -> java.util.stream.LongStream {
boolean allMatch(LongPredicate)
boolean anyMatch(LongPredicate)
DoubleStream asDoubleStream()
@ -177,12 +177,12 @@ class LongStream -> java.util.stream.LongStream extends BaseStream {
long[] toArray()
}
class LongStream.Builder -> java.util.stream.LongStream$Builder extends LongConsumer {
class LongStream.Builder -> java.util.stream.LongStream$Builder {
LongStream.Builder add(long)
LongStream build()
}
class Stream -> java.util.stream.Stream extends BaseStream {
class Stream -> java.util.stream.Stream {
boolean allMatch(Predicate)
boolean anyMatch(Predicate)
Stream.Builder builder()
@ -221,14 +221,14 @@ class Stream -> java.util.stream.Stream extends BaseStream {
def[] toArray(IntFunction)
}
class Stream.Builder -> java.util.stream.Stream$Builder extends Consumer {
class Stream.Builder -> java.util.stream.Stream$Builder {
Stream.Builder add(def)
Stream build()
}
#### Classes
class Collectors -> java.util.stream.Collectors extends Object {
class Collectors -> java.util.stream.Collectors {
Collector averagingDouble(ToDoubleFunction)
Collector averagingInt(ToIntFunction)
Collector averagingLong(ToLongFunction)
@ -264,7 +264,7 @@ class Collectors -> java.util.stream.Collectors extends Object {
#### Enums
class Collector.Characteristics -> java.util.stream.Collector$Characteristics extends Enum,Object {
class Collector.Characteristics -> java.util.stream.Collector$Characteristics {
Collector.Characteristics CONCURRENT
Collector.Characteristics IDENTITY_FINISH
Collector.Characteristics UNORDERED

View File

@ -24,7 +24,7 @@
#### Interfaces
class Collection -> java.util.Collection extends Iterable {
class Collection -> java.util.Collection {
boolean add(def)
boolean addAll(Collection)
void clear()
@ -41,13 +41,13 @@ class Collection -> java.util.Collection extends Iterable {
def[] toArray(def[])
# some adaptations of groovy methods
List org.elasticsearch.painless.api.Augmentation.collect(Function)
def org.elasticsearch.painless.api.Augmentation.collect(Collection,Function)
def org.elasticsearch.painless.api.Augmentation.find(Predicate)
List org.elasticsearch.painless.api.Augmentation.findAll(Predicate)
def org.elasticsearch.painless.api.Augmentation.findResult(Function)
def org.elasticsearch.painless.api.Augmentation.findResult(def,Function)
List org.elasticsearch.painless.api.Augmentation.split(Predicate)
List org.elasticsearch.painless.api.Augmentation collect(Function)
def org.elasticsearch.painless.api.Augmentation collect(Collection,Function)
def org.elasticsearch.painless.api.Augmentation find(Predicate)
List org.elasticsearch.painless.api.Augmentation findAll(Predicate)
def org.elasticsearch.painless.api.Augmentation findResult(Function)
def org.elasticsearch.painless.api.Augmentation findResult(def,Function)
List org.elasticsearch.painless.api.Augmentation split(Predicate)
}
class Comparator -> java.util.Comparator {
@ -70,7 +70,7 @@ class Comparator -> java.util.Comparator {
Comparator thenComparingLong(ToLongFunction)
}
class Deque -> java.util.Deque extends Queue,Collection,Iterable {
class Deque -> java.util.Deque {
void addFirst(def)
void addLast(def)
Iterator descendingIterator()
@ -110,7 +110,7 @@ class Iterator -> java.util.Iterator {
void remove()
}
class List -> java.util.List extends Collection,Iterable {
class List -> java.util.List {
void add(int,def)
boolean addAll(int,Collection)
boolean equals(Object)
@ -123,12 +123,12 @@ class List -> java.util.List extends Collection,Iterable {
def remove(int)
void replaceAll(UnaryOperator)
def set(int,def)
int org.elasticsearch.painless.api.Augmentation.getLength()
int org.elasticsearch.painless.api.Augmentation getLength()
void sort(Comparator)
List subList(int,int)
}
class ListIterator -> java.util.ListIterator extends Iterator {
class ListIterator -> java.util.ListIterator {
void add(def)
boolean hasPrevious()
int nextIndex()
@ -163,17 +163,17 @@ class Map -> java.util.Map {
Collection values()
# some adaptations of groovy methods
List org.elasticsearch.painless.api.Augmentation.collect(BiFunction)
def org.elasticsearch.painless.api.Augmentation.collect(Collection,BiFunction)
int org.elasticsearch.painless.api.Augmentation.count(BiPredicate)
def org.elasticsearch.painless.api.Augmentation.each(BiConsumer)
boolean org.elasticsearch.painless.api.Augmentation.every(BiPredicate)
Map.Entry org.elasticsearch.painless.api.Augmentation.find(BiPredicate)
Map org.elasticsearch.painless.api.Augmentation.findAll(BiPredicate)
def org.elasticsearch.painless.api.Augmentation.findResult(BiFunction)
def org.elasticsearch.painless.api.Augmentation.findResult(def,BiFunction)
List org.elasticsearch.painless.api.Augmentation.findResults(BiFunction)
Map org.elasticsearch.painless.api.Augmentation.groupBy(BiFunction)
List org.elasticsearch.painless.api.Augmentation collect(BiFunction)
def org.elasticsearch.painless.api.Augmentation collect(Collection,BiFunction)
int org.elasticsearch.painless.api.Augmentation count(BiPredicate)
def org.elasticsearch.painless.api.Augmentation each(BiConsumer)
boolean org.elasticsearch.painless.api.Augmentation every(BiPredicate)
Map.Entry org.elasticsearch.painless.api.Augmentation find(BiPredicate)
Map org.elasticsearch.painless.api.Augmentation findAll(BiPredicate)
def org.elasticsearch.painless.api.Augmentation findResult(BiFunction)
def org.elasticsearch.painless.api.Augmentation findResult(def,BiFunction)
List org.elasticsearch.painless.api.Augmentation findResults(BiFunction)
Map org.elasticsearch.painless.api.Augmentation groupBy(BiFunction)
}
class Map.Entry -> java.util.Map$Entry {
@ -188,7 +188,7 @@ class Map.Entry -> java.util.Map$Entry {
def setValue(def)
}
class NavigableMap -> java.util.NavigableMap extends SortedMap,Map {
class NavigableMap -> java.util.NavigableMap {
Map.Entry ceilingEntry(def)
def ceilingKey(def)
NavigableSet descendingKeySet()
@ -208,7 +208,7 @@ class NavigableMap -> java.util.NavigableMap extends SortedMap,Map {
NavigableMap tailMap(def,boolean)
}
class NavigableSet -> java.util.NavigableSet extends SortedSet,Set,Collection,Iterable {
class NavigableSet -> java.util.NavigableSet {
def ceiling(def)
Iterator descendingIterator()
NavigableSet descendingSet()
@ -226,21 +226,21 @@ class Observer -> java.util.Observer {
void update(Observable,Object)
}
class PrimitiveIterator -> java.util.PrimitiveIterator extends Iterator {
class PrimitiveIterator -> java.util.PrimitiveIterator {
void forEachRemaining(def)
}
class PrimitiveIterator.OfDouble -> java.util.PrimitiveIterator$OfDouble extends PrimitiveIterator,Iterator {
class PrimitiveIterator.OfDouble -> java.util.PrimitiveIterator$OfDouble {
Double next()
double nextDouble()
}
class PrimitiveIterator.OfInt -> java.util.PrimitiveIterator$OfInt extends PrimitiveIterator,Iterator {
class PrimitiveIterator.OfInt -> java.util.PrimitiveIterator$OfInt {
Integer next()
int nextInt()
}
class PrimitiveIterator.OfLong -> java.util.PrimitiveIterator$OfLong extends PrimitiveIterator,Iterator {
class PrimitiveIterator.OfLong -> java.util.PrimitiveIterator$OfLong {
Long next()
long nextLong()
}
@ -264,25 +264,25 @@ class Spliterator -> java.util.Spliterator {
Spliterator trySplit()
}
class Spliterator.OfPrimitive -> java.util.Spliterator$OfPrimitive extends Spliterator {
class Spliterator.OfPrimitive -> java.util.Spliterator$OfPrimitive {
void forEachRemaining(def)
boolean tryAdvance(def)
Spliterator.OfPrimitive trySplit()
}
class Spliterator.OfDouble -> java.util.Spliterator$OfDouble extends Spliterator.OfPrimitive,Spliterator {
class Spliterator.OfDouble -> java.util.Spliterator$OfDouble {
Spliterator.OfDouble trySplit()
}
class Spliterator.OfInt -> java.util.Spliterator$OfInt extends Spliterator.OfPrimitive,Spliterator {
class Spliterator.OfInt -> java.util.Spliterator$OfInt {
Spliterator.OfInt trySplit()
}
class Spliterator.OfLong -> java.util.Spliterator$OfLong extends Spliterator.OfPrimitive,Spliterator {
class Spliterator.OfLong -> java.util.Spliterator$OfLong {
Spliterator.OfLong trySplit()
}
class Queue -> java.util.Queue extends Collection,Iterable {
class Queue -> java.util.Queue {
def element()
boolean offer(def)
def peek()
@ -293,13 +293,13 @@ class Queue -> java.util.Queue extends Collection,Iterable {
class RandomAccess -> java.util.RandomAccess {
}
class Set -> java.util.Set extends Collection,Iterable {
class Set -> java.util.Set {
boolean equals(Object)
int hashCode()
boolean remove(def)
}
class SortedMap -> java.util.SortedMap extends Map {
class SortedMap -> java.util.SortedMap {
Comparator comparator()
def firstKey()
SortedMap headMap(def)
@ -308,7 +308,7 @@ class SortedMap -> java.util.SortedMap extends Map {
SortedMap tailMap(def)
}
class SortedSet -> java.util.SortedSet extends Set,Collection,Iterable {
class SortedSet -> java.util.SortedSet {
Comparator comparator()
def first()
SortedSet headSet(def)
@ -319,55 +319,55 @@ class SortedSet -> java.util.SortedSet extends Set,Collection,Iterable {
#### Classes
class AbstractCollection -> java.util.AbstractCollection extends Collection,Iterable,Object {
class AbstractCollection -> java.util.AbstractCollection {
}
class AbstractList -> java.util.AbstractList extends AbstractCollection,List,Collection,Iterable,Object {
class AbstractList -> java.util.AbstractList {
}
class AbstractMap -> java.util.AbstractMap extends Map,Object {
class AbstractMap -> java.util.AbstractMap {
}
class AbstractMap.SimpleEntry -> java.util.AbstractMap$SimpleEntry extends Map.Entry,Object {
AbstractMap.SimpleEntry <init>(def,def)
AbstractMap.SimpleEntry <init>(Map.Entry)
class AbstractMap.SimpleEntry -> java.util.AbstractMap$SimpleEntry {
(def,def)
(Map.Entry)
}
class AbstractMap.SimpleImmutableEntry -> java.util.AbstractMap$SimpleImmutableEntry extends Map.Entry,Object {
AbstractMap.SimpleImmutableEntry <init>(def,def)
AbstractMap.SimpleImmutableEntry <init>(Map.Entry)
class AbstractMap.SimpleImmutableEntry -> java.util.AbstractMap$SimpleImmutableEntry {
(def,def)
(Map.Entry)
}
class AbstractQueue -> java.util.AbstractQueue extends AbstractCollection,Queue,Collection,Iterable,Object {
class AbstractQueue -> java.util.AbstractQueue {
}
class AbstractSequentialList -> java.util.AbstractSequentialList extends AbstractList,AbstractCollection,List,Collection,Iterable,Object {
class AbstractSequentialList -> java.util.AbstractSequentialList {
}
class AbstractSet -> java.util.AbstractSet extends AbstractCollection,Set,Collection,Iterable,Object {
class AbstractSet -> java.util.AbstractSet {
}
class ArrayDeque -> java.util.ArrayDeque extends AbstractCollection,Deque,Queue,Collection,Iterable,Object {
ArrayDeque <init>()
ArrayDeque <init>(Collection)
class ArrayDeque -> java.util.ArrayDeque {
()
(Collection)
ArrayDeque clone()
}
class ArrayList -> java.util.ArrayList extends AbstractList,AbstractCollection,List,RandomAccess,Collection,Iterable,Object {
ArrayList <init>()
ArrayList <init>(Collection)
class ArrayList -> java.util.ArrayList {
()
(Collection)
def clone()
void trimToSize()
}
class Arrays -> java.util.Arrays extends Object {
class Arrays -> java.util.Arrays {
List asList(Object[])
boolean deepEquals(Object[],Object[])
int deepHashCode(Object[])
String deepToString(Object[])
}
class Base64 -> java.util.Base64 extends Object {
class Base64 -> java.util.Base64 {
Base64.Decoder getDecoder()
Base64.Encoder getEncoder()
Base64.Decoder getMimeDecoder()
@ -377,20 +377,20 @@ class Base64 -> java.util.Base64 extends Object {
Base64.Encoder getUrlEncoder()
}
class Base64.Decoder -> java.util.Base64$Decoder extends Object {
class Base64.Decoder -> java.util.Base64$Decoder {
int decode(byte[],byte[])
byte[] decode(String)
}
class Base64.Encoder -> java.util.Base64$Encoder extends Object {
class Base64.Encoder -> java.util.Base64$Encoder {
int encode(byte[],byte[])
String encodeToString(byte[])
Base64.Encoder withoutPadding()
}
class BitSet -> java.util.BitSet extends Object {
BitSet <init>()
BitSet <init>(int)
class BitSet -> java.util.BitSet {
()
(int)
void and(BitSet)
void andNot(BitSet)
int cardinality()
@ -418,7 +418,7 @@ class BitSet -> java.util.BitSet extends Object {
void xor(BitSet)
}
class Calendar -> java.util.Calendar extends Comparable,Object {
class Calendar -> java.util.Calendar {
int ALL_STYLES
int AM
int AM_PM
@ -516,8 +516,8 @@ class Calendar -> java.util.Calendar extends Comparable,Object {
Instant toInstant()
}
class Calendar.Builder -> java.util.Calendar$Builder extends Object {
Calendar.Builder <init>()
class Calendar.Builder -> java.util.Calendar$Builder {
()
Calendar build()
Calendar.Builder set(int,int)
Calendar.Builder setCalendarType(String)
@ -533,7 +533,7 @@ class Calendar.Builder -> java.util.Calendar$Builder extends Object {
Calendar.Builder setWeekDefinition(int,int)
}
class Collections -> java.util.Collections extends Object {
class Collections -> java.util.Collections {
List EMPTY_LIST
Map EMPTY_MAP
Set EMPTY_SET
@ -588,7 +588,7 @@ class Collections -> java.util.Collections extends Object {
SortedSet unmodifiableSortedSet(SortedSet)
}
class Currency -> java.util.Currency extends Object {
class Currency -> java.util.Currency {
Set getAvailableCurrencies()
String getCurrencyCode()
int getDefaultFractionDigits()
@ -600,9 +600,9 @@ class Currency -> java.util.Currency extends Object {
String getSymbol(Locale)
}
class Date -> java.util.Date extends Comparable,Object {
Date <init>()
Date <init>(long)
class Date -> java.util.Date {
()
(long)
boolean after(Date)
boolean before(Date)
def clone()
@ -612,7 +612,7 @@ class Date -> java.util.Date extends Comparable,Object {
void setTime(long)
}
class Dictionary -> java.util.Dictionary extends Object {
class Dictionary -> java.util.Dictionary {
Enumeration elements()
def get(def)
boolean isEmpty()
@ -622,8 +622,8 @@ class Dictionary -> java.util.Dictionary extends Object {
int size()
}
class DoubleSummaryStatistics -> java.util.DoubleSummaryStatistics extends DoubleConsumer,Object {
DoubleSummaryStatistics <init>()
class DoubleSummaryStatistics -> java.util.DoubleSummaryStatistics {
()
void combine(DoubleSummaryStatistics)
double getAverage()
long getCount()
@ -632,40 +632,40 @@ class DoubleSummaryStatistics -> java.util.DoubleSummaryStatistics extends Doubl
double getSum()
}
class EventListenerProxy -> java.util.EventListenerProxy extends EventListener,Object {
class EventListenerProxy -> java.util.EventListenerProxy {
EventListener getListener()
}
class EventObject -> java.util.EventObject extends Object {
EventObject <init>(Object)
class EventObject -> java.util.EventObject {
(Object)
Object getSource()
}
class FormattableFlags -> java.util.FormattableFlags extends Object {
class FormattableFlags -> java.util.FormattableFlags {
int ALTERNATE
int LEFT_JUSTIFY
int UPPERCASE
}
class Formatter -> java.util.Formatter extends Object {
Formatter <init>()
Formatter <init>(Appendable)
Formatter <init>(Appendable,Locale)
class Formatter -> java.util.Formatter {
()
(Appendable)
(Appendable,Locale)
Formatter format(Locale,String,def[])
Formatter format(String,def[])
Locale locale()
Appendable out()
}
class GregorianCalendar -> java.util.GregorianCalendar extends Calendar,Comparable,Object {
class GregorianCalendar -> java.util.GregorianCalendar {
int AD
int BC
GregorianCalendar <init>()
GregorianCalendar <init>(int,int,int)
GregorianCalendar <init>(int,int,int,int,int)
GregorianCalendar <init>(int,int,int,int,int,int)
GregorianCalendar <init>(TimeZone)
GregorianCalendar <init>(TimeZone,Locale)
()
(int,int,int)
(int,int,int,int,int)
(int,int,int,int,int,int)
(TimeZone)
(TimeZone,Locale)
GregorianCalendar from(ZonedDateTime)
Date getGregorianChange()
boolean isLeapYear(int)
@ -673,32 +673,32 @@ class GregorianCalendar -> java.util.GregorianCalendar extends Calendar,Comparab
ZonedDateTime toZonedDateTime()
}
class HashMap -> java.util.HashMap extends AbstractMap,Map,Object {
HashMap <init>()
HashMap <init>(Map)
class HashMap -> java.util.HashMap {
()
(Map)
def clone()
}
class HashSet -> java.util.HashSet extends AbstractSet,Set,Collection,Iterable,Object {
HashSet <init>()
HashSet <init>(Collection)
class HashSet -> java.util.HashSet {
()
(Collection)
def clone()
}
class Hashtable -> java.util.Hashtable extends Dictionary,Map,Object {
Hashtable <init>()
Hashtable <init>(Map)
class Hashtable -> java.util.Hashtable {
()
(Map)
def clone()
}
class IdentityHashMap -> java.util.IdentityHashMap extends AbstractMap,Map,Object {
IdentityHashMap <init>()
IdentityHashMap <init>(Map)
class IdentityHashMap -> java.util.IdentityHashMap {
()
(Map)
def clone()
}
class IntSummaryStatistics -> java.util.IntSummaryStatistics extends IntConsumer,Object {
IntSummaryStatistics <init>()
class IntSummaryStatistics -> java.util.IntSummaryStatistics {
()
void combine(IntSummaryStatistics)
double getAverage()
long getCount()
@ -707,23 +707,23 @@ class IntSummaryStatistics -> java.util.IntSummaryStatistics extends IntConsumer
long getSum()
}
class LinkedHashMap -> java.util.LinkedHashMap extends HashMap,AbstractMap,Map,Object {
LinkedHashMap <init>()
LinkedHashMap <init>(Map)
class LinkedHashMap -> java.util.LinkedHashMap {
()
(Map)
}
class LinkedHashSet -> java.util.LinkedHashSet extends HashSet,AbstractSet,Set,AbstractCollection,Collection,Iterable,Object {
LinkedHashSet <init>()
LinkedHashSet <init>(Collection)
class LinkedHashSet -> java.util.LinkedHashSet {
()
(Collection)
}
class LinkedList -> java.util.LinkedList extends AbstractSequentialList,AbstractList,List,Deque,Queue,AbstractCollection,Collection,Iterable,Object {
LinkedList <init>()
LinkedList <init>(Collection)
class LinkedList -> java.util.LinkedList {
()
(Collection)
def clone()
}
class Locale -> java.util.Locale extends Object {
class Locale -> java.util.Locale {
Locale CANADA
Locale CANADA_FRENCH
Locale CHINA
@ -748,9 +748,9 @@ class Locale -> java.util.Locale extends Object {
Locale UK
char UNICODE_LOCALE_EXTENSION
Locale US
Locale <init>(String)
Locale <init>(String,String)
Locale <init>(String,String,String)
(String)
(String,String)
(String,String,String)
def clone()
List filter(List,Collection)
List filterTags(List,Collection)
@ -788,8 +788,8 @@ class Locale -> java.util.Locale extends Object {
String toLanguageTag()
}
class Locale.Builder -> java.util.Locale$Builder extends Object {
Locale.Builder <init>()
class Locale.Builder -> java.util.Locale$Builder {
()
Locale.Builder addUnicodeLocaleAttribute(String)
Locale build()
Locale.Builder clear()
@ -805,11 +805,11 @@ class Locale.Builder -> java.util.Locale$Builder extends Object {
Locale.Builder setVariant(String)
}
class Locale.LanguageRange -> java.util.Locale$LanguageRange extends Object {
class Locale.LanguageRange -> java.util.Locale$LanguageRange {
double MAX_WEIGHT
double MIN_WEIGHT
Locale.LanguageRange <init>(String)
Locale.LanguageRange <init>(String,double)
(String)
(String,double)
String getRange()
double getWeight()
List mapEquivalents(List,Map)
@ -817,8 +817,8 @@ class Locale.LanguageRange -> java.util.Locale$LanguageRange extends Object {
List parse(String,Map)
}
class LongSummaryStatistics -> java.util.LongSummaryStatistics extends LongConsumer,Object {
LongSummaryStatistics <init>()
class LongSummaryStatistics -> java.util.LongSummaryStatistics {
()
void combine(LongSummaryStatistics)
double getAverage()
long getCount()
@ -827,7 +827,7 @@ class LongSummaryStatistics -> java.util.LongSummaryStatistics extends LongConsu
long getSum()
}
class Objects -> java.util.Objects extends Object {
class Objects -> java.util.Objects {
int compare(def,def,Comparator)
boolean deepEquals(Object,Object)
boolean equals(Object,Object)
@ -841,8 +841,8 @@ class Objects -> java.util.Objects extends Object {
String toString(Object,String)
}
class Observable -> java.util.Observable extends Object {
Observable <init>()
class Observable -> java.util.Observable {
()
void addObserver(Observer)
int countObservers()
void deleteObserver(Observer)
@ -852,7 +852,7 @@ class Observable -> java.util.Observable extends Object {
void notifyObservers(Object)
}
class Optional -> java.util.Optional extends Object {
class Optional -> java.util.Optional {
Optional empty()
Optional filter(Predicate)
Optional flatMap(Function)
@ -867,7 +867,7 @@ class Optional -> java.util.Optional extends Object {
def orElseThrow(Supplier)
}
class OptionalDouble -> java.util.OptionalDouble extends Object {
class OptionalDouble -> java.util.OptionalDouble {
OptionalDouble empty()
double getAsDouble()
void ifPresent(DoubleConsumer)
@ -878,7 +878,7 @@ class OptionalDouble -> java.util.OptionalDouble extends Object {
double orElseThrow(Supplier)
}
class OptionalInt -> java.util.OptionalInt extends Object {
class OptionalInt -> java.util.OptionalInt {
OptionalInt empty()
int getAsInt()
void ifPresent(IntConsumer)
@ -889,7 +889,7 @@ class OptionalInt -> java.util.OptionalInt extends Object {
int orElseThrow(Supplier)
}
class OptionalLong -> java.util.OptionalLong extends Object {
class OptionalLong -> java.util.OptionalLong {
OptionalLong empty()
long getAsLong()
void ifPresent(LongConsumer)
@ -900,14 +900,14 @@ class OptionalLong -> java.util.OptionalLong extends Object {
long orElseThrow(Supplier)
}
class PriorityQueue -> java.util.PriorityQueue extends AbstractQueue,Queue,AbstractCollection,Collection,Iterable,Object {
PriorityQueue <init>()
PriorityQueue <init>(Comparator)
class PriorityQueue -> java.util.PriorityQueue {
()
(Comparator)
}
class Random -> java.util.Random extends Object {
Random <init>()
Random <init>(long)
class Random -> java.util.Random {
()
(long)
DoubleStream doubles(long)
DoubleStream doubles(long,double,double)
IntStream ints(long)
@ -925,14 +925,14 @@ class Random -> java.util.Random extends Object {
void setSeed(long)
}
class SimpleTimeZone -> java.util.SimpleTimeZone extends TimeZone,Object {
class SimpleTimeZone -> java.util.SimpleTimeZone {
int STANDARD_TIME
int UTC_TIME
int WALL_TIME
SimpleTimeZone <init>(int,String)
SimpleTimeZone <init>(int,String,int,int,int,int,int,int,int,int)
SimpleTimeZone <init>(int,String,int,int,int,int,int,int,int,int,int)
SimpleTimeZone <init>(int,String,int,int,int,int,int,int,int,int,int,int,int)
(int,String)
(int,String,int,int,int,int,int,int,int,int)
(int,String,int,int,int,int,int,int,int,int,int)
(int,String,int,int,int,int,int,int,int,int,int,int,int)
int getDSTSavings()
void setDSTSavings(int)
void setEndRule(int,int,int)
@ -944,7 +944,7 @@ class SimpleTimeZone -> java.util.SimpleTimeZone extends TimeZone,Object {
void setStartYear(int)
}
class Spliterators -> java.util.Spliterators extends Object {
class Spliterators -> java.util.Spliterators {
Spliterator.OfDouble emptyDoubleSpliterator()
Spliterator.OfInt emptyIntSpliterator()
Spliterator.OfLong emptyLongSpliterator()
@ -955,8 +955,8 @@ class Spliterators -> java.util.Spliterators extends Object {
Spliterator spliteratorUnknownSize(Iterator,int)
}
class Stack -> java.util.Stack extends Vector,AbstractList,List,AbstractCollection,Collection,Iterable,RandomAccess,Object {
Stack <init>()
class Stack -> java.util.Stack {
()
def push(def)
def pop()
def peek()
@ -964,26 +964,26 @@ class Stack -> java.util.Stack extends Vector,AbstractList,List,AbstractCollecti
int search(def)
}
class StringJoiner -> java.util.StringJoiner extends Object {
StringJoiner <init>(CharSequence)
StringJoiner <init>(CharSequence,CharSequence,CharSequence)
class StringJoiner -> java.util.StringJoiner {
(CharSequence)
(CharSequence,CharSequence,CharSequence)
StringJoiner add(CharSequence)
int length()
StringJoiner merge(StringJoiner)
StringJoiner setEmptyValue(CharSequence)
}
class StringTokenizer -> java.util.StringTokenizer extends Enumeration,Object {
StringTokenizer <init>(String)
StringTokenizer <init>(String,String)
StringTokenizer <init>(String,String,boolean)
class StringTokenizer -> java.util.StringTokenizer {
(String)
(String,String)
(String,String,boolean)
int countTokens()
boolean hasMoreTokens()
String nextToken()
String nextToken(String)
}
class TimeZone -> java.util.TimeZone extends Object {
class TimeZone -> java.util.TimeZone {
int LONG
int SHORT
def clone()
@ -1008,20 +1008,20 @@ class TimeZone -> java.util.TimeZone extends Object {
boolean useDaylightTime()
}
class TreeMap -> java.util.TreeMap extends AbstractMap,NavigableMap,SortedMap,Map,Object {
TreeMap <init>()
TreeMap <init>(Comparator)
class TreeMap -> java.util.TreeMap {
()
(Comparator)
def clone()
}
class TreeSet -> java.util.TreeSet extends AbstractSet,NavigableSet,SortedSet,Set,AbstractCollection,Collection,Iterable,Object {
TreeSet <init>()
TreeSet <init>(Comparator)
class TreeSet -> java.util.TreeSet {
()
(Comparator)
def clone()
}
class UUID -> java.util.UUID extends Comparable,Object {
UUID <init>(long,long)
class UUID -> java.util.UUID {
(long,long)
int compareTo(UUID)
int clockSequence()
UUID fromString(String)
@ -1034,9 +1034,9 @@ class UUID -> java.util.UUID extends Comparable,Object {
int version()
}
class Vector -> java.util.Vector extends AbstractList,List,AbstractCollection,Collection,Iterable,RandomAccess,Object {
Vector <init>()
Vector <init>(Collection)
class Vector -> java.util.Vector {
()
(Collection)
void addElement(def)
void copyInto(Object[])
def elementAt(int)
@ -1054,19 +1054,19 @@ class Vector -> java.util.Vector extends AbstractList,List,AbstractCollection,Co
#### Enums
class Formatter.BigDecimalLayoutForm -> java.util.Formatter$BigDecimalLayoutForm extends Enum,Comparable,Object {
class Formatter.BigDecimalLayoutForm -> java.util.Formatter$BigDecimalLayoutForm {
Formatter.BigDecimalLayoutForm DECIMAL_FLOAT
Formatter.BigDecimalLayoutForm SCIENTIFIC
}
class Locale.Category -> java.util.Locale$Category extends Enum,Comparable,Object {
class Locale.Category -> java.util.Locale$Category {
Locale.Category DISPLAY
Locale.Category FORMAT
Locale.Category valueOf(String)
Locale.Category[] values()
}
class Locale.FilteringMode -> java.util.Locale$FilteringMode extends Enum,Comparable,Object {
class Locale.FilteringMode -> 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 extends Enum,Compar
#### Exceptions
class ConcurrentModificationException -> java.util.ConcurrentModificationException extends RuntimeException,Exception,Object {
ConcurrentModificationException <init>()
ConcurrentModificationException <init>(String)
class ConcurrentModificationException -> java.util.ConcurrentModificationException {
()
(String)
}
class DuplicateFormatFlagsException -> java.util.DuplicateFormatFlagsException extends IllegalFormatException,IllegalArgumentException,RuntimeException,Exception,Object {
DuplicateFormatFlagsException <init>(String)
class DuplicateFormatFlagsException -> java.util.DuplicateFormatFlagsException {
(String)
String getFlags()
}
class EmptyStackException -> java.util.EmptyStackException extends RuntimeException,Exception,Object {
EmptyStackException <init>()
class EmptyStackException -> java.util.EmptyStackException {
()
}
class FormatFlagsConversionMismatchException -> java.util.FormatFlagsConversionMismatchException extends IllegalFormatException,IllegalArgumentException,RuntimeException,Exception,Object {
FormatFlagsConversionMismatchException <init>(String,char)
class FormatFlagsConversionMismatchException -> java.util.FormatFlagsConversionMismatchException {
(String,char)
char getConversion()
String getFlags()
}
class FormatterClosedException -> java.util.FormatterClosedException extends IllegalStateException,RuntimeException,Exception,Object {
FormatterClosedException <init>()
class FormatterClosedException -> java.util.FormatterClosedException {
()
}
class IllegalFormatCodePointException -> java.util.IllegalFormatCodePointException extends IllegalFormatException,IllegalArgumentException,RuntimeException,Exception,Object {
IllegalFormatCodePointException <init>(int)
class IllegalFormatCodePointException -> java.util.IllegalFormatCodePointException {
(int)
int getCodePoint()
}
class IllegalFormatConversionException -> java.util.IllegalFormatConversionException extends IllegalFormatException,IllegalArgumentException,RuntimeException,Exception,Object {
class IllegalFormatConversionException -> java.util.IllegalFormatConversionException {
char getConversion()
}
class IllegalFormatException -> java.util.IllegalFormatException extends IllegalArgumentException,RuntimeException,Exception,Object {
class IllegalFormatException -> java.util.IllegalFormatException {
}
class IllegalFormatFlagsException -> java.util.IllegalFormatFlagsException extends IllegalFormatException,IllegalArgumentException,RuntimeException,Exception,Object {
IllegalFormatFlagsException <init>(String)
class IllegalFormatFlagsException -> java.util.IllegalFormatFlagsException {
(String)
String getFlags()
}
class IllegalFormatPrecisionException -> java.util.IllegalFormatPrecisionException extends IllegalFormatException,IllegalArgumentException,RuntimeException,Exception,Object {
IllegalFormatPrecisionException <init>(int)
class IllegalFormatPrecisionException -> java.util.IllegalFormatPrecisionException {
(int)
int getPrecision()
}
class IllegalFormatWidthException -> java.util.IllegalFormatWidthException extends IllegalFormatException,IllegalArgumentException,RuntimeException,Exception,Object {
IllegalFormatWidthException <init>(int)
class IllegalFormatWidthException -> java.util.IllegalFormatWidthException {
(int)
int getWidth()
}
class IllformedLocaleException -> java.util.IllformedLocaleException extends RuntimeException,Exception,Object {
IllformedLocaleException <init>()
IllformedLocaleException <init>(String)
IllformedLocaleException <init>(String,int)
class IllformedLocaleException -> java.util.IllformedLocaleException {
()
(String)
(String,int)
int getErrorIndex()
}
class InputMismatchException -> java.util.InputMismatchException extends NoSuchElementException,RuntimeException,Exception,Object {
InputMismatchException <init>()
InputMismatchException <init>(String)
class InputMismatchException -> java.util.InputMismatchException {
()
(String)
}
class MissingFormatArgumentException -> java.util.MissingFormatArgumentException extends IllegalFormatException,IllegalArgumentException,RuntimeException,Exception,Object {
MissingFormatArgumentException <init>(String)
class MissingFormatArgumentException -> java.util.MissingFormatArgumentException {
(String)
String getFormatSpecifier()
}
class MissingFormatWidthException -> java.util.MissingFormatWidthException extends IllegalFormatException,IllegalArgumentException,RuntimeException,Exception,Object {
MissingFormatWidthException <init>(String)
class MissingFormatWidthException -> java.util.MissingFormatWidthException {
(String)
String getFormatSpecifier()
}
class MissingResourceException -> java.util.MissingResourceException extends RuntimeException,Exception,Object {
MissingResourceException <init>(String,String,String)
class MissingResourceException -> java.util.MissingResourceException {
(String,String,String)
String getClassName()
String getKey()
}
class NoSuchElementException -> java.util.NoSuchElementException extends RuntimeException,Exception,Object {
NoSuchElementException <init>()
NoSuchElementException <init>(String)
class NoSuchElementException -> java.util.NoSuchElementException {
()
(String)
}
class TooManyListenersException -> java.util.TooManyListenersException extends Exception,Object {
TooManyListenersException <init>()
TooManyListenersException <init>(String)
class TooManyListenersException -> java.util.TooManyListenersException {
()
(String)
}
class UnknownFormatConversionException -> java.util.UnknownFormatConversionException extends IllegalFormatException,IllegalArgumentException,RuntimeException,Exception,Object {
UnknownFormatConversionException <init>(String)
class UnknownFormatConversionException -> java.util.UnknownFormatConversionException {
(String)
String getConversion()
}
class UnknownFormatFlagsException -> java.util.UnknownFormatFlagsException extends IllegalFormatException,IllegalArgumentException,RuntimeException,Exception,Object {
UnknownFormatFlagsException <init>(String)
class UnknownFormatFlagsException -> java.util.UnknownFormatFlagsException {
(String)
String getFlags()
}

View File

@ -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 extends Comparable {
class org.joda.time.ReadableInstant -> org.joda.time.ReadableInstant {
boolean equals(Object)
long getMillis()
int hashCode()
@ -36,7 +36,7 @@ class org.joda.time.ReadableInstant -> org.joda.time.ReadableInstant extends Com
String toString()
}
class org.joda.time.ReadableDateTime -> org.joda.time.ReadableDateTime extends org.joda.time.ReadableInstant,Comparable {
class org.joda.time.ReadableDateTime -> org.joda.time.ReadableDateTime {
int getCenturyOfEra()
int getDayOfMonth()
int getDayOfWeek()

View File

@ -51,33 +51,26 @@ class float -> float {
class double -> double {
}
class def -> java.lang.Object {
boolean equals(Object)
int hashCode()
String toString()
}
#### Painless debugging API
class Debug -> org.elasticsearch.painless.api.Debug extends Object {
class Debug -> org.elasticsearch.painless.api.Debug {
void explain(Object)
}
#### ES Scripting API
class org.elasticsearch.common.geo.GeoPoint -> org.elasticsearch.common.geo.GeoPoint extends Object {
class org.elasticsearch.common.geo.GeoPoint -> org.elasticsearch.common.geo.GeoPoint {
double getLat()
double getLon()
}
class org.elasticsearch.index.fielddata.ScriptDocValues.Strings -> org.elasticsearch.index.fielddata.ScriptDocValues$Strings extends List,Collection,Iterable,Object {
class org.elasticsearch.index.fielddata.ScriptDocValues.Strings -> 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 extends List,Collection,Iterable,Object {
class org.elasticsearch.index.fielddata.ScriptDocValues.Longs -> org.elasticsearch.index.fielddata.ScriptDocValues$Longs {
Long get(int)
long getValue()
List getValues()
@ -85,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 extends List,Collection,Iterable,Object {
class org.elasticsearch.index.fielddata.ScriptDocValues.Dates -> org.elasticsearch.index.fielddata.ScriptDocValues$Dates {
org.joda.time.ReadableDateTime get(int)
org.joda.time.ReadableDateTime getValue()
List getValues()
@ -93,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 extends List,Collection,Iterable,Object {
class org.elasticsearch.index.fielddata.ScriptDocValues.Doubles -> 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 extends List,Collection,Iterable,Object {
class org.elasticsearch.index.fielddata.ScriptDocValues.GeoPoints -> org.elasticsearch.index.fielddata.ScriptDocValues$GeoPoints {
org.elasticsearch.common.geo.GeoPoint get(int)
org.elasticsearch.common.geo.GeoPoint getValue()
List getValues()
@ -117,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 extends List,Collection,Iterable,Object {
class org.elasticsearch.index.fielddata.ScriptDocValues.Booleans -> 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 extends List,Collection,Iterable,Object {
class org.elasticsearch.index.fielddata.ScriptDocValues.BytesRefs -> org.elasticsearch.index.fielddata.ScriptDocValues$BytesRefs {
BytesRef get(int)
BytesRef getValue()
List getValues()
}
class BytesRef -> org.apache.lucene.util.BytesRef extends Object {
class BytesRef -> org.apache.lucene.util.BytesRef {
byte[] bytes
int offset
int length
@ -137,7 +130,7 @@ class BytesRef -> org.apache.lucene.util.BytesRef extends Object {
String utf8ToString()
}
class org.elasticsearch.index.mapper.IpFieldMapper.IpFieldType.IpScriptDocValues -> org.elasticsearch.index.mapper.IpFieldMapper$IpFieldType$IpScriptDocValues extends List,Collection,Iterable,Object {
class org.elasticsearch.index.mapper.IpFieldMapper.IpFieldType.IpScriptDocValues -> org.elasticsearch.index.mapper.IpFieldMapper$IpFieldType$IpScriptDocValues {
String get(int)
String getValue()
List getValues()
@ -145,9 +138,9 @@ 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 extends Object {
org.elasticsearch.painless.FeatureTest <init>()
org.elasticsearch.painless.FeatureTest <init>(int,int)
class org.elasticsearch.painless.FeatureTest -> org.elasticsearch.painless.FeatureTest {
()
(int,int)
int getX()
int getY()
void setX(int)
@ -156,32 +149,32 @@ class org.elasticsearch.painless.FeatureTest -> org.elasticsearch.painless.Featu
boolean overloadedStatic(boolean)
Object twoFunctionsOfX(Function,Function)
void listInput(List)
int org.elasticsearch.painless.FeatureTestAugmentation.getTotal()
int org.elasticsearch.painless.FeatureTestAugmentation.addToTotal(int)
int org.elasticsearch.painless.FeatureTestAugmentation getTotal()
int org.elasticsearch.painless.FeatureTestAugmentation addToTotal(int)
}
class org.elasticsearch.search.lookup.FieldLookup -> org.elasticsearch.search.lookup.FieldLookup extends Object {
class org.elasticsearch.search.lookup.FieldLookup -> org.elasticsearch.search.lookup.FieldLookup {
def getValue()
List getValues()
boolean isEmpty()
}
class org.elasticsearch.index.similarity.ScriptedSimilarity.Query -> org.elasticsearch.index.similarity.ScriptedSimilarity$Query extends Object {
class org.elasticsearch.index.similarity.ScriptedSimilarity.Query -> org.elasticsearch.index.similarity.ScriptedSimilarity$Query {
float getBoost()
}
class org.elasticsearch.index.similarity.ScriptedSimilarity.Field -> org.elasticsearch.index.similarity.ScriptedSimilarity$Field extends Object {
class org.elasticsearch.index.similarity.ScriptedSimilarity.Field -> 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 extends Object {
class org.elasticsearch.index.similarity.ScriptedSimilarity.Term -> org.elasticsearch.index.similarity.ScriptedSimilarity$Term {
long getDocFreq()
long getTotalTermFreq()
}
class org.elasticsearch.index.similarity.ScriptedSimilarity.Doc -> org.elasticsearch.index.similarity.ScriptedSimilarity$Doc extends Object {
class org.elasticsearch.index.similarity.ScriptedSimilarity.Doc -> org.elasticsearch.index.similarity.ScriptedSimilarity$Doc {
int getLength()
float getFreq()
}