com.sun.msv.grammar
Class ExpressionCloner

java.lang.Object
  |
  +--com.sun.msv.grammar.ExpressionCloner
All Implemented Interfaces:
ExpressionVisitorExpression
Direct Known Subclasses:
AttributePruner, AttributeRemover, IslandSchemaImpl.Binder, RefExpRemover

public abstract class ExpressionCloner
extends Object
implements ExpressionVisitorExpression

clones an expression.

By visiting an expression, returns a cloned expression.

This class is useless by itself since expressions are shared and unified. It should be used as a base class for various AGM-related tasks to modify AGM.

Note that this class doesn't provide default implementations for onAttribute, onElement, and onRef methods. Typically, the derived class needs to do something to prevent infinite recursion.

Author:
Kohsuke KAWAGUCHI

Method Summary
 Expression onAnyString()
           
 Expression onChoice(ChoiceExp exp)
           
 Expression onConcur(ConcurExp exp)
           
 Expression onEpsilon()
           
 Expression onInterleave(InterleaveExp exp)
           
 Expression onKey(KeyExp exp)
           
 Expression onList(ListExp exp)
           
 Expression onMixed(MixedExp exp)
           
 Expression onNullSet()
           
 Expression onOneOrMore(OneOrMoreExp exp)
           
 Expression onSequence(SequenceExp exp)
           
 Expression onTypedString(TypedStringExp exp)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sun.msv.grammar.ExpressionVisitorExpression
onAttribute, onElement, onOther, onRef
 

Method Detail

onChoice

public Expression onChoice(ChoiceExp exp)
Specified by:
onChoice in interface ExpressionVisitorExpression

onOneOrMore

public Expression onOneOrMore(OneOrMoreExp exp)
Specified by:
onOneOrMore in interface ExpressionVisitorExpression

onMixed

public Expression onMixed(MixedExp exp)
Specified by:
onMixed in interface ExpressionVisitorExpression

onList

public Expression onList(ListExp exp)
Specified by:
onList in interface ExpressionVisitorExpression

onKey

public Expression onKey(KeyExp exp)
Specified by:
onKey in interface ExpressionVisitorExpression

onSequence

public Expression onSequence(SequenceExp exp)
Specified by:
onSequence in interface ExpressionVisitorExpression

onConcur

public Expression onConcur(ConcurExp exp)
Specified by:
onConcur in interface ExpressionVisitorExpression

onInterleave

public Expression onInterleave(InterleaveExp exp)
Specified by:
onInterleave in interface ExpressionVisitorExpression

onEpsilon

public Expression onEpsilon()
Specified by:
onEpsilon in interface ExpressionVisitorExpression

onNullSet

public Expression onNullSet()
Specified by:
onNullSet in interface ExpressionVisitorExpression

onAnyString

public Expression onAnyString()
Specified by:
onAnyString in interface ExpressionVisitorExpression

onTypedString

public Expression onTypedString(TypedStringExp exp)
Specified by:
onTypedString in interface ExpressionVisitorExpression