Class OtherExp
- java.lang.Object
-
- com.sun.msv.grammar.Expression
-
- com.sun.msv.grammar.OtherExp
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
ExternalAttributeExp,OccurrenceExp
public class OtherExp extends Expression
Base class for application-specific AGM annotation.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
OtherExpand add application-specific information to AGM.For example, you can implement
AnnotationInfoExpclass that derivesOtherExpand introduces "documentation" field. Then you'll write a customizedXMLSchemaReaderthat parses <annotation> tag and mixAnnotationInfoExpinto 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.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description Expressionexpchild expression.private static longserialVersionUID-
Fields inherited from class com.sun.msv.grammar.Expression
anyString, epsilon, nullSet, verifierTag
-
-
Constructor Summary
Constructors Constructor Description OtherExp()OtherExp(Expression exp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancalcEpsilonReducibility()computes epsilon reducibilityprotected intcalcHashCode()Computes the hashCode again.booleanequals(java.lang.Object o)java.lang.StringprintName()returns the string which will be used by ExpressionPrinter to print this expression.java.lang.Objectvisit(ExpressionVisitor visitor)booleanvisit(ExpressionVisitorBoolean visitor)Expressionvisit(ExpressionVisitorExpression visitor)voidvisit(ExpressionVisitorVoid visitor)-
Methods inherited from class com.sun.msv.grammar.Expression
getExpandedExp, hashCode, hashCode, hashCode, isEpsilonReducible, peelOccurence, readResolve, visit, visit, visit, visit
-
-
-
-
Field Detail
-
exp
public Expression exp
child expression.
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
OtherExp
public OtherExp()
-
OtherExp
public OtherExp(Expression exp)
-
-
Method Detail
-
printName
public java.lang.String printName()
returns the string which will be used by ExpressionPrinter to print this expression.
-
calcHashCode
protected final int calcHashCode()
Description copied from class:ExpressionComputes 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:
calcHashCodein classExpression
-
equals
public boolean equals(java.lang.Object o)
- Specified by:
equalsin classExpression
-
calcEpsilonReducibility
protected boolean calcEpsilonReducibility()
Description copied from class:Expressioncomputes epsilon reducibility- Specified by:
calcEpsilonReducibilityin classExpression
-
visit
public final java.lang.Object visit(ExpressionVisitor visitor)
- Specified by:
visitin classExpression
-
visit
public final Expression visit(ExpressionVisitorExpression visitor)
- Specified by:
visitin classExpression
-
visit
public final boolean visit(ExpressionVisitorBoolean visitor)
- Specified by:
visitin classExpression
-
visit
public final void visit(ExpressionVisitorVoid visitor)
- Specified by:
visitin classExpression
-
-