Package org.elasticsearch.painless.spi
Class WhitelistMethod
java.lang.Object
org.elasticsearch.painless.spi.WhitelistMethod
Method represents the equivalent of a Java method available as a whitelisted class method
within Painless. Methods for Painless classes may be accessed exactly as methods for Java classes
are using the '.' operator on an existing class variable/field. Painless classes may have multiple
methods with the same name as long as they comply with arity overloading described in
WhitelistClass.
Classes may also have additional methods that are not part of the Java class the class represents -
these are known as augmented methods. An augmented method can be added to a class 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 class. Note that the augmented method's parent Java class does not need to be
whitelisted.-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal StringThe class name for the owner of an augmented method.final StringThe method name used to look up the method reflection object.final StringInformation about where this method was whitelisted from.TheMapof annotations for this method.final StringThe canonical type name for the return type. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
origin
Information about where this method was whitelisted from. -
augmentedCanonicalClassName
The class name for the owner of an augmented method. If the method is not augmented this should benull. -
methodName
The method name used to look up the method reflection object. -
returnCanonicalTypeName
The canonical type name for the return type. -
canonicalTypeNameParameters
-
painlessAnnotations
TheMapof annotations for this method.
-
-
Constructor Details
-
WhitelistMethod
public WhitelistMethod(String origin, String augmentedCanonicalClassName, String methodName, String returnCanonicalTypeName, List<String> canonicalTypeNameParameters, List<Object> painlessAnnotations) Standard constructor. All values must be notnullwith the exception of augmentedCanonicalClassName; augmentedCanonicalClassName will benullunless the method is augmented as described in the class documentation.
-