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

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.MarkupToString

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

MarkupToTree gives a printable one line string presentation of the markup for debugging purposes. New lines are replaced by printables.


Field Summary
protected  java.lang.StringBuilder s
           
 
Fields inherited from class org.eclipse.ocl.examples.xtext.markup.util.MarkupSwitch
modelPackage
 
Constructor Summary
MarkupToString()
           
 
Method Summary
 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 caseFootnoteElement(FootnoteElement object)
          Returns the result of interpreting the object as an instance of 'Footnote 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 caseNullElement(NullElement object)
          Returns the result of interpreting the object as an instance of 'Null Element'.
 java.lang.StringBuilder caseOCLCodeElement(OCLCodeElement object)
          Returns the result of interpreting the object as an instance of 'OCL Code Element'.
 java.lang.StringBuilder caseOCLEvalElement(OCLEvalElement object)
          Returns the result of interpreting the object as an instance of 'OCL Eval Element'.
 java.lang.StringBuilder caseOCLTextElement(OCLTextElement object)
          Returns the result of interpreting the object as an instance of 'OCL Text 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(java.util.List<MarkupElement> elements)
           
static java.lang.String toString(MarkupElement element)
           
 
Methods inherited from class org.eclipse.ocl.examples.xtext.markup.util.MarkupSwitch
caseMarkup, caseMarkupElement, 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

protected final java.lang.StringBuilder s
Constructor Detail

MarkupToString

public MarkupToString()
Method Detail

toString

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

toString

@NonNull
public static java.lang.String toString(@NonNull
                                                java.util.List<MarkupElement> elements)

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)

caseFootnoteElement

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

Overrides:
caseFootnoteElement in class MarkupSwitch<java.lang.StringBuilder>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Footnote 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)

caseNullElement

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

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

caseOCLCodeElement

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

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

caseOCLEvalElement

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

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

caseOCLTextElement

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

Overrides:
caseOCLTextElement in class MarkupSwitch<java.lang.StringBuilder>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'OCL Text 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