Package org.elasticsearch.painless.spi
Class WhitelistClass
java.lang.Object
org.elasticsearch.painless.spi.WhitelistClass
Class represents the equivalent of a Java class in Painless complete with super classes,
constructors, methods, and fields. There must be a one-to-one mapping of class names to Java
classes. Though, since multiple whitelists may be combined into a single whitelist for a
specific context, as long as multiple classes representing the same Java class have the same
class name and have legal constructor/method overloading they can be merged together.
Classes in Painless allow for arity overloading for constructors and methods. Arity overloading
means that multiple constructors are allowed for a single class as long as they have a different
number of parameters, and multiples methods with the same name are allowed for a single class
as long as they have the same return type and a different number of parameters.
Classes will automatically extend other whitelisted classes if the Java class they represent is a
subclass of other classes including Java interfaces.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal StringThe Java class name this class represents.final StringInformation about where this class was white-listed from.TheMapof annotations for this class.final List<WhitelistConstructor>TheListof whitelisted (WhitelistConstructors) available to this class.final List<WhitelistField>TheListof whitelisted (WhitelistFields) available to this class.final List<WhitelistMethod>TheListof whitelisted (WhitelistMethods) available to this class. -
Constructor Summary
ConstructorsConstructorDescriptionWhitelistClass(String origin, String javaClassName, List<WhitelistConstructor> whitelistConstructors, List<WhitelistMethod> whitelistMethods, List<WhitelistField> whitelistFields, List<Object> painlessAnnotations) Standard constructor. -
Method Summary
-
Field Details
-
origin
Information about where this class was white-listed from. -
javaClassName
The Java class name this class represents. -
whitelistConstructors
TheListof whitelisted (WhitelistConstructors) available to this class. -
whitelistMethods
TheListof whitelisted (WhitelistMethods) available to this class. -
whitelistFields
TheListof whitelisted (WhitelistFields) available to this class. -
painlessAnnotations
TheMapof annotations for this class.
-
-
Constructor Details
-
WhitelistClass
public WhitelistClass(String origin, String javaClassName, List<WhitelistConstructor> whitelistConstructors, List<WhitelistMethod> whitelistMethods, List<WhitelistField> whitelistFields, List<Object> painlessAnnotations) Standard constructor. All values must be notnull.
-