Class WhitelistClassBinding

java.lang.Object
org.elasticsearch.painless.spi.WhitelistClassBinding

public class WhitelistClassBinding extends 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 Details

    • origin

      public final String origin
      Information about where this constructor was whitelisted from.
    • targetJavaClassName

      public final String targetJavaClassName
      The Java class name this class binding targets.
    • methodName

      public final String methodName
      The method name for this class binding.
    • returnCanonicalTypeName

      public final String returnCanonicalTypeName
      The canonical type name for the return type.
    • canonicalTypeNameParameters

      public final List<String> canonicalTypeNameParameters
      A List of Strings 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 Map<Class<?>,Object> painlessAnnotations
      The Map of annotations for this class binding.
  • Constructor Details

    • WhitelistClassBinding

      public WhitelistClassBinding(String origin, String targetJavaClassName, String methodName, String returnCanonicalTypeName, List<String> canonicalTypeNameParameters, List<Object> painlessAnnotations)
      Standard constructor. All values must be not null.