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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault ctor.Ctor. -
Method Summary
Modifier and TypeMethodDescription(package private) voidaddNoJexl(String key, Permissions.NoJexlClass njc) copy()(package private) Permissions.NoJexlClass(package private) booleanWhether this package has at least one explicitly-allowed class (a positive entry).(package private) booleanWhether this package denies all unlisted classes (deny-all-unlisted semantics).(package private) booleanisEmpty()(package private) booleanWhether this is a positive (allow-oriented) package declaration.
-
Field Details
-
nojexl
-
-
Constructor Details
-
NoJexlPackage
NoJexlPackage()Default ctor. -
NoJexlPackage
NoJexlPackage(Map<String, Permissions.NoJexlClass> map) Ctor.- Parameters:
map- The map of NoJexl classes
-
-
Method Details
-
addNoJexl
-
getNoJexl
-
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
truefor thePermissions.Markers.NOJEXL_PACKAGEsentinel andPermissions.DenyAllPackageinstances;falsefor all other package types.- Returns:
- true if unlisted classes are denied by default
-
copy
- Specified by:
copyin interfacePermissions.Copyable<Permissions.NoJexlPackage>
-