Class Permissions.Markers
- Enclosing class:
- Permissions
UNRESTRICTED permission.
These live in their own class rather than directly in Permissions to break a
class-initialization cycle: Permissions implements JexlPermissions, and
JexlPermissions carries default methods, so initializing Permissions forces
JexlPermissions.<clinit> to run first (JLS 12.4.2) — that computes RESTRICTED
/ SECURE via PermissionsParser, which reads these markers. Were they static
fields of Permissions, they would still be null at that point (assigned only
after superinterface initialization), yielding an NPE when Permissions happens to be
the first permissions class touched. A dedicated holder initializes independently of that
cycle, so the markers are always available whichever class is loaded first.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final Permissions.NoJexlClassMarker for allowed class.(package private) static final Permissions.NoJexlPackageMarker for fully allowed package.(package private) static final Permissions.NoJexlClassMarker for whole NoJexl class.(package private) static final Permissions.NoJexlClassMarker for a whole NoJexl class whose block only scopes nested-class declarations.(package private) static final Permissions.NoJexlPackageMarker for @NoJexl package.(package private) static final PermissionsThe no-restriction permission singleton (emptyPermissionsParser.parse(java.util.Set<java.lang.String>, java.util.Map<java.lang.String, org.apache.commons.jexl3.internal.introspection.Permissions.NoJexlPackage>, java.lang.String...)). -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
NOJEXL_CLASS
Marker for whole NoJexl class. -
NOJEXL_CONTAINER
Marker for a whole NoJexl class whose block only scopes nested-class declarations.Behaves exactly like
NOJEXL_CLASSfor the class itself but is distinct, so that the nested-class denial inheritance applied to-X{}does not deny the unlisted nested classes of a block that is a mere container (as inOuter { Inner {...} }). -
JEXL_CLASS
Marker for allowed class. -
NOJEXL_PACKAGE
Marker for @NoJexl package. -
JEXL_PACKAGE
Marker for fully allowed package. -
UNRESTRICTED
The no-restriction permission singleton (emptyPermissionsParser.parse(java.util.Set<java.lang.String>, java.util.Map<java.lang.String, org.apache.commons.jexl3.internal.introspection.Permissions.NoJexlPackage>, java.lang.String...)).Lives here rather than as a
Permissionsstatic field for the same reason as the markers: an emptyparse()returns this instance while computingJexlPermissionsconstants, which can happen beforePermissions' own static fields are assigned. Constructing it last (after the markers) is safe: thenew Permissions()triggersPermissions.<clinit>, whose only holder dependency is the already-assigned markers.
-
-
Constructor Details
-
Markers
private Markers()
-