Class AugmentedAnnotation
java.lang.Object
org.elasticsearch.painless.spi.annotation.AugmentedAnnotation
Use an augmented annotation to augment a class to have available
a static final field from a different class.
Example:
// Whitelist
...
class java.lang.Integer {
...
}
class Augmented {
int MAX_VALUE @augmented[augmented_canonical_class_name="java.lang.Integer"]
int MIN_VALUE @augmented[augmented_canonical_class_name="java.lang.Integer"]
}
...
// Script
...
long value = <some_value>;
int augmented = 0;
if (value < Augmented.MAX_VALUE && value > Augmented.MIN_VALUE) {
augmented = (int)value;
}
...
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
AugmentedAnnotation
-
-
Method Details
-
getAugmentedCanonicalClassName
-