Package org.opensearch.painless.spi
Class WhitelistMethod
- java.lang.Object
-
- org.opensearch.painless.spi.WhitelistMethod
-
public class WhitelistMethod extends java.lang.ObjectMethod represents the equivalent of a Java method available as an allowlisted 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 inWhitelistClass. 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 allowlisted.
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.StringaugmentedCanonicalClassNameThe class name for the owner of an augmented method.java.util.List<java.lang.String>canonicalTypeNameParametersAListofStrings that are the canonical type names for the parameters of the method used to look up the method reflection object.java.lang.StringmethodNameThe method name used to look up the method reflection object.java.lang.StringoriginInformation about where this method was allowlisted from.java.util.Map<java.lang.Class<?>,java.lang.Object>painlessAnnotationsTheMapof annotations for this method.java.lang.StringreturnCanonicalTypeNameThe canonical type name for the return type.
-
Constructor Summary
Constructors Constructor Description WhitelistMethod(java.lang.String origin, java.lang.String augmentedCanonicalClassName, java.lang.String methodName, java.lang.String returnCanonicalTypeName, java.util.List<java.lang.String> canonicalTypeNameParameters, java.util.List<java.lang.Object> painlessAnnotations)Standard constructor.
-
-
-
Field Detail
-
origin
public final java.lang.String origin
Information about where this method was allowlisted from.
-
augmentedCanonicalClassName
public final java.lang.String augmentedCanonicalClassName
The class name for the owner of an augmented method. If the method is not augmented this should benull.
-
methodName
public final java.lang.String methodName
The method name used to look up the method reflection object.
-
returnCanonicalTypeName
public final java.lang.String returnCanonicalTypeName
The canonical type name for the return type.
-
canonicalTypeNameParameters
public final java.util.List<java.lang.String> canonicalTypeNameParameters
AListofStrings that are the canonical type names for the parameters of the method used to look up the method reflection object.
-
painlessAnnotations
public final java.util.Map<java.lang.Class<?>,java.lang.Object> painlessAnnotations
TheMapof annotations for this method.
-
-
Constructor Detail
-
WhitelistMethod
public WhitelistMethod(java.lang.String origin, java.lang.String augmentedCanonicalClassName, java.lang.String methodName, java.lang.String returnCanonicalTypeName, java.util.List<java.lang.String> canonicalTypeNameParameters, java.util.List<java.lang.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.
-
-