Skip to content
Permalink
Browse files
Remove trailing whitespace.
  • Loading branch information
garydgregory committed Feb 28, 2021
1 parent 3ef0141 commit 9bfab54c4a2d5a99b89f2a07d5f5ca8b575a983b
Show file tree
Hide file tree
Showing 54 changed files with 410 additions and 410 deletions.
@@ -83,10 +83,10 @@ public static class NullOperand extends ArithmeticException {}

/** The big decimal scale. */
private final int mathScale;

/** The dynamic constructor. */
private final Constructor<? extends JexlArithmetic> ctor;

/**
* Creates a JexlArithmetic.
* <p>If you derive your own arithmetic, implement the
@@ -118,7 +118,7 @@ public JexlArithmetic(final boolean astrict, final MathContext bigdContext, fina
}
this.ctor = actor;
}

/**
* Apply options to this arithmetic which eventually may create another instance.
* @see #createWithOptions(boolean, java.math.MathContext, int)
@@ -145,7 +145,7 @@ public JexlArithmetic options(final JexlOptions options) {
}
return this;
}

/**
* Apply options to this arithmetic which eventually may create another instance.
* @see #createWithOptions(boolean, java.math.MathContext, int)
@@ -177,7 +177,7 @@ public JexlArithmetic options(final JexlEngine.Options options) {
}
return this;
}

/**
* Apply options to this arithmetic which eventually may create another instance.
* @see #createWithOptions(boolean, java.math.MathContext, int)
@@ -636,7 +636,7 @@ protected Number narrowBigDecimal(final Object lhs, final Object rhs, final BigD
}
return bigd;
}

/**
* Replace all numbers in an arguments array with the smallest type that will fit.
*
@@ -661,7 +661,7 @@ public boolean narrowArguments(final Object[] args) {
}
return narrowed;
}

/**
* Given a long, attempt to narrow it to an int.
* <p>Narrowing will only occur if no operand is a Long.
@@ -677,7 +677,7 @@ protected Number narrowLong(final Object lhs, final Object rhs, final long r) {
return r;
}
}

/**
* Checks if value class is a number that can be represented exactly in a long.
*
@@ -875,7 +875,7 @@ private static boolean isMultiplyExact(final long x, final long y, final long r)
&& (((y != 0) && (r / y != x))
|| (x == Long.MIN_VALUE && y == -1)));
}

/**
* Multiply the left value by the right.
*
@@ -1022,7 +1022,7 @@ public Object positivize(final Object val) {
if (val == null) {
controlNullOperand();
return null;
}
}
if (val instanceof Short) {
return ((Short) val).intValue();
}
@@ -1162,7 +1162,7 @@ public Boolean empty(final Object object) {
public Boolean isEmpty(final Object object) {
return isEmpty(object, object == null);
}

/**
* Check for emptiness of various types: Number, Collection, Array, Map, String.
*
@@ -1200,7 +1200,7 @@ public Boolean isEmpty(final Object object, final Boolean def) {
public Integer size(final Object object) {
return size(object, object == null? 0 : 1);
}

/**
* Calculate the <code>size</code> of various types: Collection, Array, Map, String.
*
@@ -75,10 +75,10 @@ public class JexlBuilder {

/** Whether error messages will carry debugging information. */
private Boolean debug = null;

/** Whether interrupt throws JexlException.Cancel. */
private Boolean cancellable = null;

/** The options. */
private final JexlOptions options = new JexlOptions();

@@ -266,7 +266,7 @@ public JexlBuilder charset(final Charset arg) {
public Charset charset() {
return charset;
}

/**
* Sets whether the engine will resolve antish variable names.
*
@@ -277,46 +277,46 @@ public JexlBuilder antish(final boolean flag) {
options.setAntish(flag);
return this;
}

/** @return whether antish resolution is enabled */
public boolean antish() {
return options.isAntish();
}

/**
* Sets whether the engine is in lexical mode.
*
* @param flag true means lexical function scope is in effect, false implies non-lexical scoping
* @param flag true means lexical function scope is in effect, false implies non-lexical scoping
* @return this builder
* @since 3.2
*/
public JexlBuilder lexical(final boolean flag) {
options.setLexical(flag);
return this;
}

/** @return whether lexical scope is enabled */
public boolean lexical() {
return options.isLexical();
}

/**
* Sets whether the engine is in lexical shading mode.
*
* @param flag true means lexical shading is in effect, false implies no lexical shading
* @param flag true means lexical shading is in effect, false implies no lexical shading
* @return this builder
* @since 3.2
*/
public JexlBuilder lexicalShade(final boolean flag) {
options.setLexicalShade(flag);
return this;
}

/** @return whether lexical shading is enabled */
public boolean lexicalShade() {
return options.isLexicalShade();
}

/**
* Sets whether the engine will throw JexlException during evaluation when an error is triggered.
*
@@ -417,29 +417,29 @@ public Boolean cancellable() {
public JexlBuilder collectAll(final boolean flag) {
return collectMode(flag? 1 : 0);
}

/**
* Experimental collector mode setter.
*
*
* @param mode 0 or 1 as equivalents to false and true, other values are experimental
* @return this builder
* @since 3.2
*/
public JexlBuilder collectMode(final int mode) {
this.collectMode = mode;
return this;
}
/**
* @return true if variable collection follows strict syntactic rule
}

/**
* @return true if variable collection follows strict syntactic rule
* @since 3.2
*/
public boolean collectAll() {
return this.collectMode != 0;
}

/**
* @return 0 if variable collection follows strict syntactic rule
/**
* @return 0 if variable collection follows strict syntactic rule
* @since 3.2
*/
public int collectMode() {
@@ -134,7 +134,7 @@ interface AnnotationProcessor {
* <p>All annotations are processed through this method; the statement 'call' is to be performed within
* the processAnnotation method. The implementation <em>must</em> perform the call explicitly.
* <p>The arguments and the statement <em>must not</em> be referenced or cached for longer than the duration
* of the processAnnotation call.
* of the processAnnotation call.
*
* @param name the annotation name
* @param args the arguments of the annotation, evaluated as arguments of this call
@@ -144,7 +144,7 @@ interface AnnotationProcessor {
*/
Object processAnnotation(String name, Object[] args, Callable<Object> statement) throws Exception;
}

/**
* A marker interface of the JexlContext that exposes runtime evaluation options.
* @since 3.2
@@ -161,7 +161,7 @@ interface OptionsHandle {
*/
JexlOptions getEngineOptions();
}

/**
* A marker interface of the JexlContext that processes pragmas.
* It is called by the engine before interpreter creation; as a marker of
@@ -177,7 +177,7 @@ interface PragmaProcessor {
*/
void processPragma(String key, Object value);
}

/**
* A marker interface of the JexlContext sharing a cancelling flag.
* <p>A script running in a thread can thus be notified through this reference
@@ -188,7 +188,7 @@ interface PragmaProcessor {
*/
interface CancellationHandle {
/**
* @return a cancelable boolean used by the interpreter
* @return a cancelable boolean used by the interpreter
*/
AtomicBoolean getCancellation();
}
@@ -30,7 +30,7 @@
* <li>Registers: register syntax (#number), used internally for {g,s}etProperty
* <li>Reserved Names: a set of reserved variable names that can not be used as local variable (or parameter) names
* <li>Global Side Effect : assigning/modifying values on global variables (=, += , -=, ...)
* <li>Lexical: lexical scope, prevents redefining local variables
* <li>Lexical: lexical scope, prevents redefining local variables
* <li>Lexical Shade: local variables shade globals, prevents confusing a global variable with a local one
* <li>Side Effect : assigning/modifying values on any variables or left-value
* <li>Constant Array Reference: ensures array references only use constants;they should be statically solvable.
@@ -480,20 +480,20 @@ public boolean supportsExpression() {
/**
* Sets whether syntactic lexical mode is enabled.
*
* @param flag true means syntactic lexical function scope is in effect, false implies non-lexical scoping
* @param flag true means syntactic lexical function scope is in effect, false implies non-lexical scoping
* @return this features instance
*/
public JexlFeatures lexical(final boolean flag) {
setFeature(LEXICAL, flag);
return this;
}


/** @return whether lexical scope feature is enabled */
public boolean isLexical() {
return getFeature(LEXICAL);
}

/**
* Sets whether syntactic lexical shade is enabled.
*
@@ -507,8 +507,8 @@ public JexlFeatures lexicalShade(final boolean flag) {
}
return this;
}


/** @return whether lexical shade feature is enabled */
public boolean isLexicalShade() {
return getFeature(LEXICAL_SHADE);

0 comments on commit 9bfab54

Please sign in to comment.