com.sun.msv.verifier.regexp

Class AttributePicker

public class AttributePicker extends Object implements ExpressionVisitorExpression

removes all unnecessary expressions and creates an expression that consists of required attributes and choices only. For example, <choice> <element /> <attribute /> </choice> will be converted to <empty /> because no attribute is required. But <choice> <attribute /> <attribute /> </choice> will remain the same because one or the other is required. this method also removes SequenceExp. <sequence> <attribute name="A" /> <attribute name="B" /> </sequence> will be converted to <attribute name="A" /> This function object is used only for error recovery. Resulting expressions always consist only of <choice>s and <attribute>s.

Author: Kohsuke KAWAGUCHI

Constructor Summary
AttributePicker(ExpressionPool pool)
Method Summary
ExpressiononAnyString()
ExpressiononAttribute(AttributeExp exp)
ExpressiononChoice(ChoiceExp exp)
ExpressiononConcur(ConcurExp exp)
ExpressiononData(DataExp exp)
ExpressiononElement(ElementExp exp)
ExpressiononEpsilon()
ExpressiononInterleave(InterleaveExp exp)
ExpressiononList(ListExp exp)
ExpressiononMixed(MixedExp exp)
ExpressiononNullSet()
ExpressiononOneOrMore(OneOrMoreExp exp)
ExpressiononOther(OtherExp exp)
ExpressiononRef(ReferenceExp exp)
ExpressiononSequence(SequenceExp exp)
ExpressiononValue(ValueExp exp)

Constructor Detail

AttributePicker

public AttributePicker(ExpressionPool pool)

Method Detail

onAnyString

public Expression onAnyString()

onAttribute

public Expression onAttribute(AttributeExp exp)

onChoice

public Expression onChoice(ChoiceExp exp)

onConcur

public Expression onConcur(ConcurExp exp)

onData

public Expression onData(DataExp exp)

onElement

public Expression onElement(ElementExp exp)

onEpsilon

public Expression onEpsilon()

onInterleave

public Expression onInterleave(InterleaveExp exp)

onList

public Expression onList(ListExp exp)

onMixed

public Expression onMixed(MixedExp exp)

onNullSet

public Expression onNullSet()

onOneOrMore

public Expression onOneOrMore(OneOrMoreExp exp)

onOther

public Expression onOther(OtherExp exp)

onRef

public Expression onRef(ReferenceExp exp)

onSequence

public Expression onSequence(SequenceExp exp)

onValue

public Expression onValue(ValueExp exp)