org.eclipse.ocl.examples.xtext.markup
Class MarkupToTree

java.lang.Object
  extended by org.eclipse.emf.ecore.util.Switch<T>
      extended by org.eclipse.ocl.examples.xtext.markup.util.MarkupSwitch<java.lang.StringBuilder>
          extended by org.eclipse.ocl.examples.xtext.markup.MarkupToTree

public class MarkupToTree
extends MarkupSwitch<java.lang.StringBuilder>

MarkupToTree gives an indented textual tree presentation of the markup for debugging purposes. Each line starts with a class name followed by attributes.


Field Summary
protected  java.lang.StringBuilder s
           
 
Fields inherited from class org.eclipse.ocl.examples.xtext.markup.util.MarkupSwitch
modelPackage
 
Constructor Summary
MarkupToTree()
           
 
Method Summary
protected  void appendClass(org.eclipse.emf.ecore.EObject object)
           
protected  void appendIndented(java.lang.Iterable<MarkupElement> objects)
           
protected  void appendIndented(MarkupElement object)
           
 java.lang.StringBuilder caseBulletElement(BulletElement object)
          Returns the result of interpreting the object as an instance of 'Bullet Element'.
 java.lang.StringBuilder caseCompoundElement(CompoundElement object)
          Returns the result of interpreting the object as an instance of 'Compound Element'.
 java.lang.StringBuilder caseFigureElement(FigureElement object)
          Returns the result of interpreting the object as an instance of 'Figure Element'.
 java.lang.StringBuilder caseFigureRefElement(FigureRefElement object)
          Returns the result of interpreting the object as an instance of 'Figure Ref Element'.
 java.lang.StringBuilder caseFontElement(FontElement object)
          Returns the result of interpreting the object as an instance of 'Font Element'.
 java.lang.StringBuilder caseHeadingElement(HeadingElement object)
          Returns the result of interpreting the object as an instance of 'Heading Element'.
 java.lang.StringBuilder caseNewLineElement(NewLineElement object)
          Returns the result of interpreting the object as an instance of 'New Line Element'.
 java.lang.StringBuilder caseTextElement(TextElement object)
          Returns the result of interpreting the object as an instance of 'Text Element'.
 java.lang.StringBuilder defaultCase(org.eclipse.emf.ecore.EObject object)
          Returns the result of interpreting the object as an instance of 'EObject'.
 java.lang.String toString()
           
static java.lang.String toString(MarkupElement element)
           
 
Methods inherited from class org.eclipse.ocl.examples.xtext.markup.util.MarkupSwitch
caseFootnoteElement, caseMarkup, caseMarkupElement, caseNullElement, caseOCLCodeElement, caseOCLEvalElement, caseOCLTextElement, doSwitch, isSwitchFor
 
Methods inherited from class org.eclipse.emf.ecore.util.Switch
doSwitch, doSwitch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

s

@NonNull
protected final java.lang.StringBuilder s
Constructor Detail

MarkupToTree

public MarkupToTree()
Method Detail

toString

@NonNull
public static java.lang.String toString(@NonNull
                                                MarkupElement element)

appendClass

protected void appendClass(@NonNull
                           org.eclipse.emf.ecore.EObject object)

appendIndented

protected void appendIndented(@NonNull
                              MarkupElement object)

appendIndented

protected void appendIndented(@NonNull
                              java.lang.Iterable<MarkupElement> objects)

caseBulletElement

public java.lang.StringBuilder caseBulletElement(BulletElement object)
Description copied from class: MarkupSwitch
Returns the result of interpreting the object as an instance of 'Bullet Element'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseBulletElement in class MarkupSwitch<java.lang.StringBuilder>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Bullet Element'.
See Also:
doSwitch(EObject)

caseCompoundElement

public java.lang.StringBuilder caseCompoundElement(CompoundElement object)
Description copied from class: MarkupSwitch
Returns the result of interpreting the object as an instance of 'Compound Element'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseCompoundElement in class MarkupSwitch<java.lang.StringBuilder>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Compound Element'.
See Also:
doSwitch(EObject)

caseFigureElement

public java.lang.StringBuilder caseFigureElement(FigureElement object)
Description copied from class: MarkupSwitch
Returns the result of interpreting the object as an instance of 'Figure Element'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseFigureElement in class MarkupSwitch<java.lang.StringBuilder>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Figure Element'.
See Also:
doSwitch(EObject)

caseFigureRefElement

public java.lang.StringBuilder caseFigureRefElement(FigureRefElement object)
Description copied from class: MarkupSwitch
Returns the result of interpreting the object as an instance of 'Figure Ref Element'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseFigureRefElement in class MarkupSwitch<java.lang.StringBuilder>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Figure Ref Element'.
See Also:
doSwitch(EObject)

caseFontElement

public java.lang.StringBuilder caseFontElement(FontElement object)
Description copied from class: MarkupSwitch
Returns the result of interpreting the object as an instance of 'Font Element'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseFontElement in class MarkupSwitch<java.lang.StringBuilder>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Font Element'.
See Also:
doSwitch(EObject)

caseHeadingElement

public java.lang.StringBuilder caseHeadingElement(HeadingElement object)
Description copied from class: MarkupSwitch
Returns the result of interpreting the object as an instance of 'Heading Element'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseHeadingElement in class MarkupSwitch<java.lang.StringBuilder>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Heading Element'.
See Also:
doSwitch(EObject)

caseNewLineElement

public java.lang.StringBuilder caseNewLineElement(NewLineElement object)
Description copied from class: MarkupSwitch
Returns the result of interpreting the object as an instance of 'New Line Element'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseNewLineElement in class MarkupSwitch<java.lang.StringBuilder>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'New Line Element'.
See Also:
doSwitch(EObject)

caseTextElement

public java.lang.StringBuilder caseTextElement(TextElement object)
Description copied from class: MarkupSwitch
Returns the result of interpreting the object as an instance of 'Text Element'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseTextElement in class MarkupSwitch<java.lang.StringBuilder>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Text Element'.
See Also:
doSwitch(EObject)

defaultCase

public java.lang.StringBuilder defaultCase(org.eclipse.emf.ecore.EObject object)
Description copied from class: MarkupSwitch
Returns the result of interpreting the object as an instance of 'EObject'. This implementation returns null; returning a non-null result will terminate the switch, but this is the last case anyway.

Overrides:
defaultCase in class MarkupSwitch<java.lang.StringBuilder>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'EObject'.
See Also:
Switch.doSwitch(org.eclipse.emf.ecore.EObject)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object