com.sun.msv.grammar
Class ElementExp
java.lang.Object
com.sun.msv.grammar.Expression
com.sun.msv.grammar.ElementExp
- All Implemented Interfaces:
- NameClassAndExpression, java.io.Serializable
- Direct Known Subclasses:
- AnyOtherElementExp, ElementDeclExp.XSElementExp, ElementPattern, ElementRule, ExternalElementExp
- public abstract class ElementExp
- extends Expression
- implements NameClassAndExpression
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:
- Serialized Form
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, toString, wait, wait, wait |
contentModel
public Expression contentModel
- content model of this element declaration.
ignoreUndeclaredAttributes
public boolean ignoreUndeclaredAttributes
- a flag that indicates undeclared attributes should be ignored.
ElementExp
public ElementExp(Expression contentModel,
boolean ignoreUndeclaredAttributes)
equals
public final boolean equals(java.lang.Object o)
- Specified by:
equals
in class Expression
getContentModel
public final Expression getContentModel()
- Specified by:
getContentModel
in interface NameClassAndExpression
getNameClass
public abstract NameClass 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 interface NameClassAndExpression
visit
public final java.lang.Object visit(ExpressionVisitor visitor)
- Specified by:
visit
in class Expression
visit
public final boolean visit(ExpressionVisitorBoolean visitor)
- Specified by:
visit
in class Expression
visit
public final Expression visit(ExpressionVisitorExpression visitor)
- Specified by:
visit
in class Expression
visit
public final void visit(ExpressionVisitorVoid visitor)
- Specified by:
visit
in class Expression
Copyright © 2001-2003 Sun Microsystems, Inc. Documenation generated April 26 2005.