Package org.opensearch.painless.spi
Class Whitelist
- java.lang.Object
-
- org.opensearch.painless.spi.Whitelist
-
public final class Whitelist extends java.lang.ObjectAllowlist contains data structures designed to be used to generate an allowlist of Java classes, constructors, methods, and fields that can be used within a Painless script at both compile-time and run-time. A Allowlist consists of several pieces withWhitelistClasss as the top level. EachWhitelistClasswill contain zero-to-manyWhitelistConstructors,WhitelistMethods, andWhitelistFields which are what will be available with a Painless script. See each individual allowlist object for more detail.
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.List<Whitelist>BASE_WHITELISTSjava.lang.ClassLoaderclassLoaderTheClassLoaderused to look up the allowlisted Java classes, constructors, methods, and fields.java.util.List<WhitelistClassBinding>whitelistClassBindingsTheListof all the allowlisted Painless class bindings.java.util.List<WhitelistClass>whitelistClassesTheListof all the allowlisted Painless classes.java.util.List<WhitelistMethod>whitelistImportedMethodsTheListof all the allowlisted static Painless methods.java.util.List<WhitelistInstanceBinding>whitelistInstanceBindingsTheListof all the allowlisted Painless instance bindings.
-
Constructor Summary
Constructors Constructor Description Whitelist(java.lang.ClassLoader classLoader, java.util.List<WhitelistClass> allowlistClasses, java.util.List<WhitelistMethod> allowlistImportedMethods, java.util.List<WhitelistClassBinding> allowlistClassBindings, java.util.List<WhitelistInstanceBinding> allowlistInstanceBindings)Standard constructor.
-
-
-
Field Detail
-
BASE_WHITELISTS
public static final java.util.List<Whitelist> BASE_WHITELISTS
-
classLoader
public final java.lang.ClassLoader classLoader
TheClassLoaderused to look up the allowlisted Java classes, constructors, methods, and fields.
-
whitelistClasses
public final java.util.List<WhitelistClass> whitelistClasses
TheListof all the allowlisted Painless classes.
-
whitelistImportedMethods
public final java.util.List<WhitelistMethod> whitelistImportedMethods
TheListof all the allowlisted static Painless methods.
-
whitelistClassBindings
public final java.util.List<WhitelistClassBinding> whitelistClassBindings
TheListof all the allowlisted Painless class bindings.
-
whitelistInstanceBindings
public final java.util.List<WhitelistInstanceBinding> whitelistInstanceBindings
TheListof all the allowlisted Painless instance bindings.
-
-
Constructor Detail
-
Whitelist
public Whitelist(java.lang.ClassLoader classLoader, java.util.List<WhitelistClass> allowlistClasses, java.util.List<WhitelistMethod> allowlistImportedMethods, java.util.List<WhitelistClassBinding> allowlistClassBindings, java.util.List<WhitelistInstanceBinding> allowlistInstanceBindings)Standard constructor. All values must be notnull.
-
-