In RELAX grammar, this class is used as a base class of elementRule reference and hedgeRule reference. TREX uses this class directly.
This object is created and controlled by TREXGrammar/RELAXModule object, rather than ExpressionPool. Therefore, this object is not a subject to unification.
This class can be derived. In fact, many classes derive this class.
| Modifier and Type | Field and Description |
|---|---|
| public Expression | exp
child expression. |
| public final String | name
name of the referenced expression. |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected boolean | calcEpsilonReducibility()
Implements abstract com. |
| protected final int | calcHashCode()
Implements abstract com. |
| public boolean | equals(Object
the reference object with which to compare. o)Implements abstract com. |
| public boolean | |
| public final Object | |
| public final Expression | |
| public final boolean | |
| public final void |
| exp | back to summary |
|---|---|
| public Expression exp child expression. Due to the possible forward reference, this variable is not available when the object is instanciated. Actual expression will be set once if the definition is parsed. | |
| name | back to summary |
|---|---|
| public final String name name of the referenced expression. can be null for anonymously referenced expression. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| ReferenceExp | back to summary |
|---|---|
| public ReferenceExp(String name) | |
| ReferenceExp | back to summary |
|---|---|
| public ReferenceExp(String name, Expression exp) | |
| calcEpsilonReducibility | back to summary |
|---|---|
| protected boolean calcEpsilonReducibility() Implements abstract com. Doc from com. computes epsilon reducibility | |
| calcHashCode | back to summary |
|---|---|
| protected final int calcHashCode() Implements abstract com. Doc from com. Computes the hashCode again. This method and the parameter to the constructor has to be the same. This method is used when the object is being read from the stream. | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Implements abstract com. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| isDefined | back to summary |
|---|---|
| public boolean isDefined() checks if this ReferenceExp is properly defined. this method is used to detect undeclared definitions. Derived classes can override this method. | |
| visit | back to summary |
|---|---|
| public final Object visit(ExpressionVisitor visitor) Implements abstract com. | |
| visit | back to summary |
|---|---|
| public final Expression visit(ExpressionVisitorExpression visitor) Implements abstract com. | |
| visit | back to summary |
|---|---|
| public final boolean visit(ExpressionVisitorBoolean visitor) Implements abstract com. | |
| visit | back to summary |
|---|---|
| public final void visit(ExpressionVisitorVoid visitor) Implements abstract com. | |