Class OtherExp
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ExternalAttributeExp
,OccurrenceExp
This primitive has no meaning to MSV. For example, the following expression
Expression exp = new OtherExp( pool.createSequence(a,b) );is treated as if MSV sees the following, OtherExp-less expression:
Expression exp = pool.createSequence(a,b);
By using this "transparency", application can implement derived classes
of OtherExp
and add application-specific information to AGM.
For example, you can implement AnnotationInfoExp
class that derives
OtherExp
and introduces "documentation" field.
Then you'll write a customized XMLSchemaReader
that
parses <annotation> tag and mix AnnotationInfoExp
into an AGM.
Your application can then examine it and do some useful things.
Those application-specific information added through OtherExp are completely ignored by MSV. So the annotated AGM can still be used just like anormal AGM.
- Author:
- Kohsuke KAWAGUCHI
- See Also:
-
Field Summary
FieldsFields 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
returns the string which will be used by ExpressionPrinter to print this expression.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.
-
-
Constructor Details
-
OtherExp
public OtherExp() -
OtherExp
-
-
Method Details
-
printName
returns the string which will be used by ExpressionPrinter to print this expression. -
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
-
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
-