com.sun.msv.grammar
Class OtherExp
java.lang.Object
|
+--com.sun.msv.grammar.Expression
|
+--com.sun.msv.grammar.OtherExp
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- ExternalAttributeExp
- 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 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:
- Serialized Form
exp
public Expression exp
- child expression.
OtherExp
public OtherExp()
OtherExp
public OtherExp(Expression exp)
printName
public String printName()
- returns the string which will be used by ExpressionPrinter
to print this expression.
equals
public boolean equals(Object o)
- Overrides:
equals
in class Expression
visit
public final Object visit(ExpressionVisitor visitor)
- Overrides:
visit
in class Expression
visit
public final Expression visit(ExpressionVisitorExpression visitor)
- Overrides:
visit
in class Expression
visit
public final boolean visit(ExpressionVisitorBoolean visitor)
- Overrides:
visit
in class Expression
visit
public final void visit(ExpressionVisitorVoid visitor)
- Overrides:
visit
in class Expression