Skip to content

Commit

Permalink
Make package private class final
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Nov 5, 2023
1 parent d62ed87 commit 31c0e31
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* package names as roots of import.
* <p>This only keeps names of classes to avoid any class loading/reloading/permissions issue.</p>
*/
class FqcnResolver implements JexlContext.ClassNameResolver {
final class FqcnResolver implements JexlContext.ClassNameResolver {
/**
* The class loader.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public Iterator<Integer> iterator() {
/**
* An ascending iterator on an integer range.
*/
class AscIntegerIterator implements Iterator<Integer> {
final class AscIntegerIterator implements Iterator<Integer> {
/** The lower boundary. */
private final int min;
/** The upper boundary. */
Expand Down Expand Up @@ -272,7 +272,7 @@ public void remove() {
/**
* A descending iterator on an integer range.
*/
class DescIntegerIterator implements Iterator<Integer> {
final class DescIntegerIterator implements Iterator<Integer> {
/** The lower boundary. */
private final int min;
/** The upper boundary. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public Iterator<Long> iterator() {
/**
* An iterator on a long range.
*/
class AscLongIterator implements Iterator<Long> {
final class AscLongIterator implements Iterator<Long> {
/** The lower boundary. */
private final long min;
/** The upper boundary. */
Expand Down Expand Up @@ -275,7 +275,7 @@ public void remove() {
/**
* An iterator on a long range.
*/
class DescLongIterator implements Iterator<Long> {
final class DescLongIterator implements Iterator<Long> {
/** The lower boundary. */
private final long min;
/** The upper boundary. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ protected boolean removeEldestEntry(final Map.Entry<K, V> eldest) {
* @param <K> key type
* @param <V> value type
*/
class SoftCacheEntry<K, V> implements Map.Entry<K, V> {
final class SoftCacheEntry<K, V> implements Map.Entry<K, V> {
/**
* The entry key.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ protected final Object evaluate( final JexlContext context, final Frame frame, f
}

/** A constant unified expression. */
class ConstantExpression extends TemplateExpression {
final class ConstantExpression extends TemplateExpression {
/** The constant held by this unified expression. */
private final Object value;

Expand Down Expand Up @@ -484,7 +484,7 @@ JexlInfo getInfo() {
}

/** An immediate unified expression: ${jexl}. */
class ImmediateExpression extends JexlBasedExpression {
final class ImmediateExpression extends JexlBasedExpression {
/**
* Creates an immediate unified expression.
* @param expr the unified expression as a string
Expand All @@ -509,7 +509,7 @@ protected TemplateExpression prepare(final Interpreter interpreter) {
}

/** A deferred unified expression: #{jexl}. */
class DeferredExpression extends JexlBasedExpression {
final class DeferredExpression extends JexlBasedExpression {
/**
* Creates a deferred unified expression.
* @param expr the unified expression as a string
Expand Down Expand Up @@ -546,7 +546,7 @@ protected void getVariables(final Engine.VarCollector collector) {
* #{...${jexl}...}
* Note that the deferred syntax is JEXL's.
*/
class NestedExpression extends JexlBasedExpression {
final class NestedExpression extends JexlBasedExpression {
/**
* Creates a nested unified expression.
* @param expr the unified expression as a string
Expand Down Expand Up @@ -590,7 +590,7 @@ protected Object evaluate(final Interpreter interpreter) {
}

/** A composite unified expression: "... ${...} ... #{...} ...". */
class CompositeExpression extends TemplateExpression {
final class CompositeExpression extends TemplateExpression {
/** Bit encoded (deferred count > 0) bit 1, (immediate count > 0) bit 0. */
private final int meta;
/** The list of sub-expression resulting from parsing. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/**
* Utility for Java9+ backport in Java8 of class and module related methods.
*/
class ClassTool {
final class ClassTool {
/** The Class.getModule() method. */
private static final MethodHandle GET_MODULE;
/** The Class.getPackageName() method. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ public JexlPermissions compose(final String... src) {
* <p>Typical use case is to deny access to a package - and thus all its classes - but allow
* a few specific classes.</p>
*/
class ClassPermissions extends JexlPermissions.Delegate {
final class ClassPermissions extends JexlPermissions.Delegate {
/** The set of explicitly allowed classes, overriding the delegate permissions. */
private final Set<String> allowedClasses;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/**
* Checks if node is an operator node.
**/
class OperatorController extends ScriptVisitor {
final class OperatorController extends ScriptVisitor {
static final OperatorController INSTANCE = new OperatorController();

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
* This class only exists to prevent JJTree from generating it, since it
* expects {@link ParserVisitor} to be an interface, not an abstract class.
*/
class ParserDefaultVisitor { }
final class ParserDefaultVisitor { }

0 comments on commit 31c0e31

Please sign in to comment.