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 whitelists may be combined into a single whitelist 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 whitelisted 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.
      • noImport

        public final boolean noImport
        Allow the Java class name to only be specified as the fully-qualified name.
      • whitelistFields

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

      • WhitelistClass

        public WhitelistClass​(java.lang.String origin,
                              java.lang.String javaClassName,
                              boolean noImport,
                              java.util.List<WhitelistConstructor> whitelistConstructors,
                              java.util.List<WhitelistMethod> whitelistMethods,
                              java.util.List<WhitelistField> whitelistFields)
        Standard constructor. All values must be not null.