public class ExpressionPrinter extends Object implements ExpressionVisitor
| Modifier and Type | Field and Description |
|---|---|
static int |
CONTENTMODEL
in this mode, element declaration is
one of the terminal symbol of stringnization.
|
static ExpressionPrinter |
contentModelInstance |
static int |
FRAGMENT
in this mode, reference to other expression is
one of the terminal symbol of stringnization.
|
static ExpressionPrinter |
fragmentInstance |
protected int |
mode
this flag controls how expression will be stringnized
|
static ExpressionPrinter |
smallestInstance |
| Modifier | Constructor and Description |
|---|---|
protected |
ExpressionPrinter(int mode) |
| Modifier and Type | Method and Description |
|---|---|
protected static boolean |
isComplex(Expression exp)
determines whether brackets should be used to represent the pattern
|
Object |
onAnyString() |
Object |
onAttribute(AttributeExp exp) |
Object |
onChoice(ChoiceExp exp) |
Object |
onConcur(ConcurExp exp) |
Object |
onData(DataExp exp) |
Object |
onElement(ElementExp exp) |
Object |
onEpsilon() |
Object |
onInterleave(InterleaveExp exp) |
Object |
onList(ListExp exp) |
Object |
onMixed(MixedExp exp) |
Object |
onNullSet() |
Object |
onOneOrMore(OneOrMoreExp exp) |
Object |
onOther(OtherExp exp) |
Object |
onRef(ReferenceExp exp) |
Object |
onSequence(SequenceExp exp) |
Object |
onValue(ValueExp exp) |
protected String |
printBinary(BinaryExp exp,
String op) |
static String |
printContentModel(Expression exp) |
static String |
printFragment(Expression exp) |
String |
printRefContainer(ReferenceContainer cont)
dumps all the contents of ReferenceContainer.
|
static String |
printSmallest(Expression exp) |
public static final int FRAGMENT
public static final int CONTENTMODEL
public static ExpressionPrinter fragmentInstance
public static ExpressionPrinter contentModelInstance
public static ExpressionPrinter smallestInstance
protected final int mode
public static String printFragment(Expression exp)
public static String printContentModel(Expression exp)
public static String printSmallest(Expression exp)
public String printRefContainer(ReferenceContainer cont)
protected static boolean isComplex(Expression exp)
public Object onAttribute(AttributeExp exp)
onAttribute in interface ExpressionVisitorpublic Object onChoice(ChoiceExp exp)
onChoice in interface ExpressionVisitorpublic Object onConcur(ConcurExp exp)
onConcur in interface ExpressionVisitorpublic Object onInterleave(InterleaveExp exp)
onInterleave in interface ExpressionVisitorpublic Object onElement(ElementExp exp)
onElement in interface ExpressionVisitorpublic Object onOneOrMore(OneOrMoreExp exp)
onOneOrMore in interface ExpressionVisitorpublic Object onMixed(MixedExp exp)
onMixed in interface ExpressionVisitorpublic Object onList(ListExp exp)
onList in interface ExpressionVisitorpublic Object onEpsilon()
onEpsilon in interface ExpressionVisitorpublic Object onNullSet()
onNullSet in interface ExpressionVisitorpublic Object onAnyString()
onAnyString in interface ExpressionVisitorpublic Object onSequence(SequenceExp exp)
onSequence in interface ExpressionVisitorpublic Object onData(DataExp exp)
onData in interface ExpressionVisitorpublic Object onValue(ValueExp exp)
onValue in interface ExpressionVisitorpublic Object onOther(OtherExp exp)
onOther in interface ExpressionVisitorpublic Object onRef(ReferenceExp exp)
onRef in interface ExpressionVisitorCopyright © 2014 Oracle Corporation. All Rights Reserved.