Package org.opensearch.painless.spi
Class WhitelistClassBinding
java.lang.Object
org.opensearch.painless.spi.WhitelistClassBinding
public class WhitelistClassBinding
extends java.lang.Object
A class binding represents a method call that stores state. Each class binding's Java class must
have exactly one public constructor and one public method excluding those inherited directly
from
Object. The canonical type name parameters provided must match those of the
constructor and method combined. The constructor for a class binding's Java class will be called
when the binding method is called for the first time at which point state may be stored for the
arguments passed into the constructor. The method for a binding class will be called each time
the binding method is called and may use the previously stored state.-
Field Summary
Fields Modifier and Type Field Description java.util.List<java.lang.String>canonicalTypeNameParametersAListofStrings that are the Painless type names for the parameters of the constructor which can be used to look up the Java constructor through reflection.java.lang.StringmethodNameThe method name for this class binding.java.lang.StringoriginInformation about where this constructor was whitelisted from.java.util.Map<java.lang.Class<?>,java.lang.Object>painlessAnnotationsTheMapof annotations for this class binding.java.lang.StringreturnCanonicalTypeNameThe canonical type name for the return type.java.lang.StringtargetJavaClassNameThe Java class name this class binding targets. -
Constructor Summary
Constructors Constructor Description WhitelistClassBinding(java.lang.String origin, java.lang.String targetJavaClassName, java.lang.String methodName, java.lang.String returnCanonicalTypeName, java.util.List<java.lang.String> canonicalTypeNameParameters, java.util.List<java.lang.Object> painlessAnnotations)Standard constructor. -
Method Summary
-
Field Details
-
origin
public final java.lang.String originInformation about where this constructor was whitelisted from. -
targetJavaClassName
public final java.lang.String targetJavaClassNameThe Java class name this class binding targets. -
methodName
public final java.lang.String methodNameThe method name for this class binding. -
returnCanonicalTypeName
public final java.lang.String returnCanonicalTypeNameThe canonical type name for the return type. -
canonicalTypeNameParameters
public final java.util.List<java.lang.String> canonicalTypeNameParametersAListofStrings that are the Painless type names for the parameters of the constructor which can be used to look up the Java constructor through reflection. -
painlessAnnotations
public final java.util.Map<java.lang.Class<?>,java.lang.Object> painlessAnnotationsTheMapof annotations for this class binding.
-
-
Constructor Details
-
WhitelistClassBinding
public WhitelistClassBinding(java.lang.String origin, java.lang.String targetJavaClassName, 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 notnull.
-