Package com.sun.msv.grammar
Class ReferenceExp
java.lang.Object
com.sun.msv.grammar.Expression
com.sun.msv.grammar.ReferenceExp
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AttPoolClause
,AttributeDeclExp
,ElementDeclExp
,ElementRules
,HedgeRules
,RedefinableExp
,TagClause
,TREXGrammar
,XSDatatypeExp
Reference to the other expression.
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.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionchild expression.final String
name of the referenced expression.private static final long
Fields inherited from class com.sun.msv.grammar.Expression
anyString, epsilon, nullSet, verifierTag
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
computes epsilon reducibilityprotected final int
Computes the hashCode again.boolean
boolean
checks if this ReferenceExp is properly defined.final Object
visit
(ExpressionVisitor visitor) final boolean
visit
(ExpressionVisitorBoolean visitor) final Expression
visit
(ExpressionVisitorExpression visitor) final void
visit
(ExpressionVisitorVoid visitor) Methods inherited from class com.sun.msv.grammar.Expression
getExpandedExp, hashCode, hashCode, hashCode, isEpsilonReducible, peelOccurence, readResolve, visit, visit, visit, visit
-
Field Details
-
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
name of the referenced expression. can be null for anonymously referenced expression. -
serialVersionUID
private static final long serialVersionUID- See Also:
-
-
Constructor Details
-
ReferenceExp
-
ReferenceExp
-
-
Method Details
-
calcHashCode
protected final int calcHashCode()Description copied from class:Expression
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.
- Specified by:
calcHashCode
in classExpression
-
isDefined
public boolean isDefined()checks if this ReferenceExp is properly defined. this method is used to detect undeclared definitions. Derived classes can override this method. -
equals
- Specified by:
equals
in classExpression
-
calcEpsilonReducibility
protected boolean calcEpsilonReducibility()Description copied from class:Expression
computes epsilon reducibility- Specified by:
calcEpsilonReducibility
in classExpression
-
visit
- Specified by:
visit
in classExpression
-
visit
- Specified by:
visit
in classExpression
-
visit
- Specified by:
visit
in classExpression
-
visit
- Specified by:
visit
in classExpression
-