Package com.sun.msv.grammar
Class ElementExp
java.lang.Object
com.sun.msv.grammar.Expression
com.sun.msv.grammar.ElementExp
- All Implemented Interfaces:
NameClassAndExpression
,Serializable
- Direct Known Subclasses:
AnyOtherElementExp
,ElementDeclExp.XSElementExp
,ElementPattern
,ElementRule
,ExternalElementExp
Element declaration.
For RELAX, this is a base implementation of 'elementRule' declaration.
For TREX, this is a base implementation of 'element' pattern.
Each grammar must/can provide only one concrete implementation.
Therefore, they cannot override visit method.
This class can be extended.
- Author:
- Kohsuke KAWAGUCHI
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptioncontent model of this element declaration.boolean
a flag that indicates undeclared attributes should be ignored.Fields inherited from class com.sun.msv.grammar.Expression
anyString, epsilon, nullSet, verifierTag
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected final boolean
computes epsilon reducibilityprotected final int
Computes the hashCode again.final boolean
final Expression
abstract NameClass
obtains a constraint over tag name.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
-
contentModel
content model of this element declaration. -
ignoreUndeclaredAttributes
public boolean ignoreUndeclaredAttributesa flag that indicates undeclared attributes should be ignored.
-
-
Constructor Details
-
ElementExp
-
-
Method Details
-
getContentModel
- Specified by:
getContentModel
in interfaceNameClassAndExpression
-
getNameClass
obtains a constraint over tag name. ElementExp is cannot be shared because NameClass has to be mutable to absorb the difference of RELAX and TREX. In case of TREX, name class will be determined when parsing ElementExp itself. Thus effectively it's immutable. In case of RELAX, name class will be determined when its corresponding Clause object is parsed.- Specified by:
getNameClass
in interfaceNameClassAndExpression
-
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
-
equals
- Specified by:
equals
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
-
calcEpsilonReducibility
protected final boolean calcEpsilonReducibility()Description copied from class:Expression
computes epsilon reducibility- Specified by:
calcEpsilonReducibility
in classExpression
-