Package org.elasticsearch.painless.spi.annotation
package org.elasticsearch.painless.spi.annotation
-
ClassDescriptionCreates an alias in PainlessLookupBuilder for the given class.Parser for theMarks an allowlisted constructor or method that allocates a fixed number of
bytes, charged against the per-context allocation limit before the call executes.Parses@allocates_constant[bytes="40b"]: a singlebytesargument holding a non-negativeByteSizeValue(a unit is required except for"0").Marks an allowlisted constructor or method whose allocation size depends on its arguments.Parses@allocates_dynamic[class="fully.qualified.Class", method="methodName"].Use an augmented annotation to augment a class to have available a static final field from a different class.Methods annotated with this must be run at compile time so their arguments must all be constant and they produce a constant.Methods annotated withCompileTimeOnlyAnnotationmust be run at compile time so their arguments must all be constant and they produce a constant.Inject compiler setting constants.Marks a whitelisted augmentation method as script-aware: in script contexts that activate it, the lookup builder resolves the call to an augmentation overload that takes a leadingPainlessScriptparameter, and the compiler emitsaload 0(the script receiver) ahead of the user-supplied arguments at every call site.WhitelistAnnotationParser is an interface used to define how to parse an annotation against any whitelist object while loading.