Package org.opensearch.painless.spi
Class Whitelist
java.lang.Object
org.opensearch.painless.spi.Whitelist
Allowlist 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 with WhitelistClasss as the top level. Each
WhitelistClass will contain zero-to-many WhitelistConstructors, WhitelistMethods, and
WhitelistFields which are what will be available with a Painless script. See each individual
allowlist object for more detail.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal ClassLoaderTheClassLoaderused to look up the allowlisted Java classes, constructors, methods, and fields.final List<WhitelistClassBinding> TheListof all the allowlisted Painless class bindings.final List<WhitelistClass> TheListof all the allowlisted Painless classes.final List<WhitelistMethod> TheListof all the allowlisted static Painless methods.final List<WhitelistInstanceBinding> TheListof all the allowlisted Painless instance bindings. -
Constructor Summary
ConstructorsConstructorDescriptionWhitelist(ClassLoader classLoader, List<WhitelistClass> allowlistClasses, List<WhitelistMethod> allowlistImportedMethods, List<WhitelistClassBinding> allowlistClassBindings, List<WhitelistInstanceBinding> allowlistInstanceBindings) Standard constructor. -
Method Summary
-
Field Details
-
BASE_WHITELISTS
-
classLoader
TheClassLoaderused to look up the allowlisted Java classes, constructors, methods, and fields. -
whitelistClasses
TheListof all the allowlisted Painless classes. -
whitelistImportedMethods
TheListof all the allowlisted static Painless methods. -
whitelistClassBindings
TheListof all the allowlisted Painless class bindings. -
whitelistInstanceBindings
TheListof all the allowlisted Painless instance bindings.
-
-
Constructor Details
-
Whitelist
public Whitelist(ClassLoader classLoader, List<WhitelistClass> allowlistClasses, List<WhitelistMethod> allowlistImportedMethods, List<WhitelistClassBinding> allowlistClassBindings, List<WhitelistInstanceBinding> allowlistInstanceBindings) Standard constructor. All values must be notnull.
-