Class WhitelistClass


  • public final class WhitelistClass
    extends java.lang.Object
    Class represents the equivalent of a Java class in Painless complete with super classes, constructors, methods, and fields. There must be a one-to-one mapping of class names to Java classes. Though, since multiple allowlists may be combined into a single allowlist for a specific context, as long as multiple classes representing the same Java class have the same class name and have legal constructor/method overloading they can be merged together. Classes in Painless allow for arity overloading for constructors and methods. Arity overloading means that multiple constructors are allowed for a single class as long as they have a different number of parameters, and multiples methods with the same name are allowed for a single class as long as they have the same return type and a different number of parameters. Classes will automatically extend other allowlisted classes if the Java class they represent is a subclass of other classes including Java interfaces.
    • Field Detail

      • origin

        public final java.lang.String origin
        Information about where this class was white-listed from.
      • javaClassName

        public final java.lang.String javaClassName
        The Java class name this class represents.
      • whitelistFields

        public final java.util.List<WhitelistField> whitelistFields
        The List of allowlisted (WhitelistFields) available to this class.
      • painlessAnnotations

        public final java.util.Map<java.lang.Class<?>,​java.lang.Object> painlessAnnotations
        The Map of annotations for this class.
    • Constructor Detail

      • WhitelistClass

        public WhitelistClass​(java.lang.String origin,
                              java.lang.String javaClassName,
                              java.util.List<WhitelistConstructor> allowlistConstructors,
                              java.util.List<WhitelistMethod> allowlistMethods,
                              java.util.List<WhitelistField> allowlistFields,
                              java.util.List<java.lang.Object> painlessAnnotations)
        Standard constructor. All values must be not null.