com.sun.msv.grammar.util

Class ExpressionPrinter

public class ExpressionPrinter extends Object implements ExpressionVisitor

creates a string representation of the expression. useful for debug and dump.

Author: Kohsuke KAWAGUCHI

Field Summary
static ExpressionPrintercontentModelInstance
static intCONTENTMODEL
in this mode, element declaration is one of the terminal symbol of stringnization.
static ExpressionPrinterfragmentInstance
static intFRAGMENT
in this mode, reference to other expression is one of the terminal symbol of stringnization.
static ExpressionPrintersmallestInstance
Method Summary
ObjectonAnyString()
ObjectonAttribute(AttributeExp exp)
ObjectonChoice(ChoiceExp exp)
ObjectonConcur(ConcurExp exp)
ObjectonData(DataExp exp)
ObjectonElement(ElementExp exp)
ObjectonEpsilon()
ObjectonInterleave(InterleaveExp exp)
ObjectonList(ListExp exp)
ObjectonMixed(MixedExp exp)
ObjectonNullSet()
ObjectonOneOrMore(OneOrMoreExp exp)
ObjectonOther(OtherExp exp)
ObjectonRef(ReferenceExp exp)
ObjectonSequence(SequenceExp exp)
ObjectonValue(ValueExp exp)
static StringprintContentModel(Expression exp)
static StringprintFragment(Expression exp)
StringprintRefContainer(ReferenceContainer cont)
dumps all the contents of ReferenceContainer. this method is a useful piece to dump the entire grammar.
static StringprintSmallest(Expression exp)

Field Detail

contentModelInstance

public static ExpressionPrinter contentModelInstance

CONTENTMODEL

public static final int CONTENTMODEL
in this mode, element declaration is one of the terminal symbol of stringnization. Suitable to dump the content model of element declarations.

fragmentInstance

public static ExpressionPrinter fragmentInstance

FRAGMENT

public static final int FRAGMENT
in this mode, reference to other expression is one of the terminal symbol of stringnization. Suitable to dump the entire grammar

smallestInstance

public static ExpressionPrinter smallestInstance

Method Detail

onAnyString

public Object onAnyString()

onAttribute

public Object onAttribute(AttributeExp exp)

onChoice

public Object onChoice(ChoiceExp exp)

onConcur

public Object onConcur(ConcurExp exp)

onData

public Object onData(DataExp exp)

onElement

public Object onElement(ElementExp exp)

onEpsilon

public Object onEpsilon()

onInterleave

public Object onInterleave(InterleaveExp exp)

onList

public Object onList(ListExp exp)

onMixed

public Object onMixed(MixedExp exp)

onNullSet

public Object onNullSet()

onOneOrMore

public Object onOneOrMore(OneOrMoreExp exp)

onOther

public Object onOther(OtherExp exp)

onRef

public Object onRef(ReferenceExp exp)

onSequence

public Object onSequence(SequenceExp exp)

onValue

public Object onValue(ValueExp exp)

printContentModel

public static String printContentModel(Expression exp)

printFragment

public static String printFragment(Expression exp)

printRefContainer

public String printRefContainer(ReferenceContainer cont)
dumps all the contents of ReferenceContainer. this method is a useful piece to dump the entire grammar.

printSmallest

public static String printSmallest(Expression exp)