ValueExpression and MethodExpression, implementing
characteristics common to both.
All expressions must implement the equals() and hashCode() methods so that two expressions
can be compared for equality. They are redefined abstract in this class to force their implementation in subclasses.
All expressions must also be Serializable so that they can be saved and restored.
Expressions are also designed to be immutable so that only one instance needs to be created for any
given expression String / FunctionMapper. This allows a container to pre-create expressions and not have to
re-parse them each time they are evaluated.
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public abstract boolean | Returns: true if obj equals this Expression; false otherwise.the obj)Object to test for equality.Overrides java. Expression.
|
| public abstract String | Returns: The original expression String.Returns the original String used to create this |
| public abstract int | Returns: The hash code for thisExpression.Overrides java. Expression.
|
| public abstract boolean | Returns: true if this expression was created from only literal text; false otherwise.Returns whether this expression was created from only literal text. |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| Expression | back to summary |
|---|---|
| public Expression() | |
| equals | back to summary |
|---|---|
| public abstract boolean equals(Object obj) Overrides java. Determines whether the specified object is equal to this
The result is
Note that two expressions can be equal if their expression Strings are different. For example,
| |
| getExpressionString | back to summary |
|---|---|
| public abstract String getExpressionString() Returns the original String used to create this This is used for debugging purposes but also for the purposes of comparison (e.g. to ensure the expression in a configuration file has not changed).
This method does not provide sufficient information to re-create an expression. Two different expressions can have
exactly the same expression string but different function mappings. Serialization should be used to save and restore
the state of an
| |
| hashCode | back to summary |
|---|---|
| public abstract int hashCode() Overrides java. Returns the hash code for this
See the note in the
| |
| isLiteralText | back to summary |
|---|---|
| public abstract boolean isLiteralText() Returns whether this expression was created from only literal text.
This method must return
| |