org.eclipse.xtext.grammaranalysis.impl
Class GrammarElementTitleSwitch

java.lang.Object
  extended by org.eclipse.xtext.util.XtextSwitch<java.lang.String>
      extended by org.eclipse.xtext.grammaranalysis.impl.GrammarElementTitleSwitch
All Implemented Interfaces:
com.google.common.base.Function<AbstractElement,java.lang.String>

public class GrammarElementTitleSwitch
extends XtextSwitch<java.lang.String>
implements com.google.common.base.Function<AbstractElement,java.lang.String>

Author:
Moritz Eysholdt - Initial contribution and API

Nested Class Summary
protected static class GrammarElementTitleSwitch.Node
           
 
Field Summary
protected  boolean showActionAsRuleCall
           
protected  boolean showAssignment
           
protected  boolean showCardinality
           
protected  boolean showQualified
           
protected  boolean showRule
           
protected  java.lang.String valueForNull
           
 
Fields inherited from class org.eclipse.xtext.util.XtextSwitch
modelPackage
 
Constructor Summary
GrammarElementTitleSwitch()
           
 
Method Summary
protected  java.lang.String addAssignemnt(java.lang.String result, AbstractElement ele)
           
protected  java.lang.String addCrossRef(java.lang.String result, AbstractElement ele)
           
protected  java.lang.String addCrossRefOrAssignemnt(java.lang.String result, AbstractElement ele)
           
protected  java.lang.String addQualified(java.lang.String result, AbstractElement ele)
           
 java.lang.String apply(AbstractElement from)
           
protected  java.lang.String card(AbstractElement ele)
           
 java.lang.String caseAbstractElement(AbstractElement object)
          Returns the result of interpreting the object as an instance of 'Abstract Element'.
 java.lang.String caseAbstractRule(AbstractRule object)
          Returns the result of interpreting the object as an instance of 'Abstract Rule'.
 java.lang.String caseAction(Action object)
          Returns the result of interpreting the object as an instance of 'Action'.
 java.lang.String caseAlternatives(Alternatives object)
          Returns the result of interpreting the object as an instance of 'Alternatives'.
 java.lang.String caseAssignment(Assignment object)
          Returns the result of interpreting the object as an instance of 'Assignment'.
 java.lang.String caseCrossReference(CrossReference object)
          Returns the result of interpreting the object as an instance of 'Cross Reference'.
 java.lang.String caseGroup(Group object)
          Returns the result of interpreting the object as an instance of 'Group'.
 java.lang.String caseKeyword(Keyword object)
          Returns the result of interpreting the object as an instance of 'Keyword'.
 java.lang.String caseRuleCall(RuleCall object)
          Returns the result of interpreting the object as an instance of 'Rule Call'.
 java.lang.String caseUnorderedGroup(UnorderedGroup object)
          Returns the result of interpreting the object as an instance of 'Unordered Group'.
protected  GrammarElementTitleSwitch copy()
           
 java.lang.String defaultCase(org.eclipse.emf.ecore.EObject object)
          Returns the result of interpreting the object as an instance of 'EObject'.
 java.lang.String doSwitch(org.eclipse.emf.ecore.EObject theEObject)
          Calls caseXXX for each class of the model until one returns a non null result; it yields that result.
 GrammarElementTitleSwitch hideCardinality()
           
 GrammarElementTitleSwitch setValueForNull(java.lang.String value)
           
 GrammarElementTitleSwitch showActionsAsRuleCalls()
           
 GrammarElementTitleSwitch showAssignments()
           
 GrammarElementTitleSwitch showQualified()
           
 GrammarElementTitleSwitch showRule()
           
 
Methods inherited from class org.eclipse.xtext.util.XtextSwitch
caseAbstractMetamodelDeclaration, caseAbstractNegatedToken, caseCharacterRange, caseCompoundElement, caseEnumLiteralDeclaration, caseEnumRule, caseEOF, caseGeneratedMetamodel, caseGrammar, caseNegatedToken, caseParserRule, caseReferencedMetamodel, caseTerminalRule, caseTypeRef, caseUntilToken, caseWildcard, doSwitch, doSwitch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.google.common.base.Function
equals
 

Field Detail

showActionAsRuleCall

protected boolean showActionAsRuleCall

showAssignment

protected boolean showAssignment

showCardinality

protected boolean showCardinality

showQualified

protected boolean showQualified

showRule

protected boolean showRule

valueForNull

protected java.lang.String valueForNull
Constructor Detail

GrammarElementTitleSwitch

public GrammarElementTitleSwitch()
Method Detail

addAssignemnt

protected java.lang.String addAssignemnt(java.lang.String result,
                                         AbstractElement ele)

addCrossRef

protected java.lang.String addCrossRef(java.lang.String result,
                                       AbstractElement ele)

addCrossRefOrAssignemnt

protected java.lang.String addCrossRefOrAssignemnt(java.lang.String result,
                                                   AbstractElement ele)

addQualified

protected java.lang.String addQualified(java.lang.String result,
                                        AbstractElement ele)

apply

public java.lang.String apply(AbstractElement from)
Specified by:
apply in interface com.google.common.base.Function<AbstractElement,java.lang.String>

card

protected java.lang.String card(AbstractElement ele)

caseAbstractElement

public java.lang.String caseAbstractElement(AbstractElement object)
Description copied from class: XtextSwitch
Returns the result of interpreting the object as an instance of 'Abstract Element'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseAbstractElement in class XtextSwitch<java.lang.String>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Abstract Element'.
See Also:
doSwitch(EObject)

caseAbstractRule

public java.lang.String caseAbstractRule(AbstractRule object)
Description copied from class: XtextSwitch
Returns the result of interpreting the object as an instance of 'Abstract Rule'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseAbstractRule in class XtextSwitch<java.lang.String>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Abstract Rule'.
See Also:
doSwitch(EObject)

caseAction

public java.lang.String caseAction(Action object)
Description copied from class: XtextSwitch
Returns the result of interpreting the object as an instance of 'Action'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseAction in class XtextSwitch<java.lang.String>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Action'.
See Also:
doSwitch(EObject)

caseAlternatives

public java.lang.String caseAlternatives(Alternatives object)
Description copied from class: XtextSwitch
Returns the result of interpreting the object as an instance of 'Alternatives'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseAlternatives in class XtextSwitch<java.lang.String>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Alternatives'.
See Also:
doSwitch(EObject)

caseAssignment

public java.lang.String caseAssignment(Assignment object)
Description copied from class: XtextSwitch
Returns the result of interpreting the object as an instance of 'Assignment'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseAssignment in class XtextSwitch<java.lang.String>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Assignment'.
See Also:
doSwitch(EObject)

caseCrossReference

public java.lang.String caseCrossReference(CrossReference object)
Description copied from class: XtextSwitch
Returns the result of interpreting the object as an instance of 'Cross Reference'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseCrossReference in class XtextSwitch<java.lang.String>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Cross Reference'.
See Also:
doSwitch(EObject)

caseGroup

public java.lang.String caseGroup(Group object)
Description copied from class: XtextSwitch
Returns the result of interpreting the object as an instance of 'Group'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseGroup in class XtextSwitch<java.lang.String>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Group'.
See Also:
doSwitch(EObject)

caseKeyword

public java.lang.String caseKeyword(Keyword object)
Description copied from class: XtextSwitch
Returns the result of interpreting the object as an instance of 'Keyword'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseKeyword in class XtextSwitch<java.lang.String>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Keyword'.
See Also:
doSwitch(EObject)

caseRuleCall

public java.lang.String caseRuleCall(RuleCall object)
Description copied from class: XtextSwitch
Returns the result of interpreting the object as an instance of 'Rule Call'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseRuleCall in class XtextSwitch<java.lang.String>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Rule Call'.
See Also:
doSwitch(EObject)

caseUnorderedGroup

public java.lang.String caseUnorderedGroup(UnorderedGroup object)
Description copied from class: XtextSwitch
Returns the result of interpreting the object as an instance of 'Unordered Group'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseUnorderedGroup in class XtextSwitch<java.lang.String>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Unordered Group'.
See Also:
doSwitch(EObject)

copy

protected GrammarElementTitleSwitch copy()

defaultCase

public java.lang.String defaultCase(org.eclipse.emf.ecore.EObject object)
Description copied from class: XtextSwitch
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 XtextSwitch<java.lang.String>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'EObject'.
See Also:
XtextSwitch.doSwitch(org.eclipse.emf.ecore.EObject)

doSwitch

public java.lang.String doSwitch(org.eclipse.emf.ecore.EObject theEObject)
Description copied from class: XtextSwitch
Calls caseXXX for each class of the model until one returns a non null result; it yields that result.

Overrides:
doSwitch in class XtextSwitch<java.lang.String>
Returns:
the first non-null result returned by a caseXXX call.

hideCardinality

public GrammarElementTitleSwitch hideCardinality()

setValueForNull

public GrammarElementTitleSwitch setValueForNull(java.lang.String value)

showActionsAsRuleCalls

public GrammarElementTitleSwitch showActionsAsRuleCalls()

showAssignments

public GrammarElementTitleSwitch showAssignments()

showQualified

public GrammarElementTitleSwitch showQualified()

showRule

public GrammarElementTitleSwitch showRule()