Class Permissions.NoJexlPackage

java.lang.Object
org.apache.commons.jexl3.internal.introspection.Permissions.NoJexlPackage
All Implemented Interfaces:
Permissions.Copyable<Permissions.NoJexlPackage>
Direct Known Subclasses:
Permissions.DenyAllPackage, Permissions.JexlPackage
Enclosing class:
Permissions

protected static class Permissions.NoJexlPackage extends Object implements Permissions.Copyable<Permissions.NoJexlPackage>
Equivalent of @NoJexl on a class in a package.
  • Field Details

  • Constructor Details

    • NoJexlPackage

      NoJexlPackage()
      Default ctor.
    • NoJexlPackage

      NoJexlPackage(Map<String,Permissions.NoJexlClass> map)
      Ctor.
      Parameters:
      map - The map of NoJexl classes
  • Method Details

    • addNoJexl

      void addNoJexl(String key, Permissions.NoJexlClass njc)
    • getNoJexl

      Permissions.NoJexlClass getNoJexl(Class<?> clazz)
    • isEmpty

      boolean isEmpty()
    • hasAllowedClass

      boolean hasAllowedClass()
      Whether this package has at least one explicitly-allowed class (a positive entry).

      A package with allowed-class entries acts as an allow-list: unlisted classes are denied. A package with only denied-class entries acts as a deny-list: unlisted classes are allowed.

      Returns:
      true if at least one class is explicitly allowed
    • isPositive

      boolean isPositive()
      Whether this is a positive (allow-oriented) package declaration.

      A positive package allows its own classes by default; a deny-list package does not.

      Returns:
      true if the package is positively allowed, false otherwise
    • isDenyAll

      boolean isDenyAll()
      Whether this package denies all unlisted classes (deny-all-unlisted semantics).

      Returns true for the Permissions.Markers.NOJEXL_PACKAGE sentinel and Permissions.DenyAllPackage instances; false for all other package types.

      Returns:
      true if unlisted classes are denied by default
    • copy

      Specified by:
      copy in interface Permissions.Copyable<Permissions.NoJexlPackage>