Package org.eclipse.xtext.util
Class XtextSwitch<T>
- java.lang.Object
-
- org.eclipse.emf.ecore.util.Switch<T>
-
- org.eclipse.xtext.util.XtextSwitch<T>
-
- Direct Known Subclasses:
ConditionEvaluator
,CurrentTypeFinder.Implementation
,GrammarElementTitleSwitch
,GrammarWithoutLeftRecursionInspector
,PredicateUsesUnorderedGroupInspector
,UsedRulesFinder
,XtextRuleInspector
public class XtextSwitch<T> extends org.eclipse.emf.ecore.util.Switch<T>
The Switch for the model's inheritance hierarchy. It supports the calldoSwitch(object)
to invoke thecaseXXX
method for each class of the model, starting with the actual class of the object and proceeding up the inheritance hierarchy until a non-null result is returned, which is the result of the switch.- See Also:
XtextPackage
- Generated:
-
-
Field Summary
Fields Modifier and Type Field Description protected static XtextPackage
modelPackage
The cached model package
-
Constructor Summary
Constructors Constructor Description XtextSwitch()
Creates an instance of the switch.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
caseAbstractElement(AbstractElement object)
Returns the result of interpreting the object as an instance of 'Abstract Element'.T
caseAbstractMetamodelDeclaration(AbstractMetamodelDeclaration object)
Returns the result of interpreting the object as an instance of 'Abstract Metamodel Declaration'.T
caseAbstractNegatedToken(AbstractNegatedToken object)
Returns the result of interpreting the object as an instance of 'Abstract Negated Token'.T
caseAbstractRule(AbstractRule object)
Returns the result of interpreting the object as an instance of 'Abstract Rule'.T
caseAction(Action object)
Returns the result of interpreting the object as an instance of 'Action'.T
caseAlternatives(Alternatives object)
Returns the result of interpreting the object as an instance of 'Alternatives'.T
caseAnnotation(Annotation object)
Returns the result of interpreting the object as an instance of 'Annotation'.T
caseAssignment(Assignment object)
Returns the result of interpreting the object as an instance of 'Assignment'.T
caseCharacterRange(CharacterRange object)
Returns the result of interpreting the object as an instance of 'Character Range'.T
caseCompositeCondition(CompositeCondition object)
Returns the result of interpreting the object as an instance of 'Composite Condition'.T
caseCompoundElement(CompoundElement object)
Returns the result of interpreting the object as an instance of 'Compound Element'.T
caseCondition(Condition object)
Returns the result of interpreting the object as an instance of 'Condition'.T
caseConjunction(Conjunction object)
Returns the result of interpreting the object as an instance of 'Conjunction'.T
caseCrossReference(CrossReference object)
Returns the result of interpreting the object as an instance of 'Cross Reference'.T
caseDisjunction(Disjunction object)
Returns the result of interpreting the object as an instance of 'Disjunction'.T
caseEnumLiteralDeclaration(EnumLiteralDeclaration object)
Returns the result of interpreting the object as an instance of 'Enum Literal Declaration'.T
caseEnumRule(EnumRule object)
Returns the result of interpreting the object as an instance of 'Enum Rule'.T
caseEOF(EOF object)
Returns the result of interpreting the object as an instance of 'EOF'.T
caseGeneratedMetamodel(GeneratedMetamodel object)
Returns the result of interpreting the object as an instance of 'Generated Metamodel'.T
caseGrammar(Grammar object)
Returns the result of interpreting the object as an instance of 'Grammar'.T
caseGroup(Group object)
Returns the result of interpreting the object as an instance of 'Group'.T
caseKeyword(Keyword object)
Returns the result of interpreting the object as an instance of 'Keyword'.T
caseLiteralCondition(LiteralCondition object)
Returns the result of interpreting the object as an instance of 'Literal Condition'.T
caseNamedArgument(NamedArgument object)
Returns the result of interpreting the object as an instance of 'Named Argument'.T
caseNegatedToken(NegatedToken object)
Returns the result of interpreting the object as an instance of 'Negated Token'.T
caseNegation(Negation object)
Returns the result of interpreting the object as an instance of 'Negation'.T
caseParameter(Parameter object)
Returns the result of interpreting the object as an instance of 'Parameter'.T
caseParameterReference(ParameterReference object)
Returns the result of interpreting the object as an instance of 'Parameter Reference'.T
caseParserRule(ParserRule object)
Returns the result of interpreting the object as an instance of 'Parser Rule'.T
caseReferencedMetamodel(ReferencedMetamodel object)
Returns the result of interpreting the object as an instance of 'Referenced Metamodel'.T
caseRuleCall(RuleCall object)
Returns the result of interpreting the object as an instance of 'Rule Call'.T
caseTerminalRule(TerminalRule object)
Returns the result of interpreting the object as an instance of 'Terminal Rule'.T
caseTypeRef(TypeRef object)
Returns the result of interpreting the object as an instance of 'Type Ref'.T
caseUnorderedGroup(UnorderedGroup object)
Returns the result of interpreting the object as an instance of 'Unordered Group'.T
caseUntilToken(UntilToken object)
Returns the result of interpreting the object as an instance of 'Until Token'.T
caseWildcard(Wildcard object)
Returns the result of interpreting the object as an instance of 'Wildcard'.T
defaultCase(org.eclipse.emf.ecore.EObject object)
Returns the result of interpreting the object as an instance of 'EObject'.protected T
doSwitch(int classifierID, org.eclipse.emf.ecore.EObject theEObject)
CallscaseXXX
for each class of the model until one returns a non null result; it yields that result.protected boolean
isSwitchFor(org.eclipse.emf.ecore.EPackage ePackage)
Checks whether this is a switch for the given package.
-
-
-
Field Detail
-
modelPackage
protected static XtextPackage modelPackage
The cached model package- Generated:
-
-
Method Detail
-
isSwitchFor
protected boolean isSwitchFor(org.eclipse.emf.ecore.EPackage ePackage)
Checks whether this is a switch for the given package.- Specified by:
isSwitchFor
in classorg.eclipse.emf.ecore.util.Switch<T>
- Parameters:
ePackage
- the package in question.- Returns:
- whether this is a switch for the given package.
- Since:
- 2.4
- Generated:
-
doSwitch
protected T doSwitch(int classifierID, org.eclipse.emf.ecore.EObject theEObject)
CallscaseXXX
for each class of the model until one returns a non null result; it yields that result.- Overrides:
doSwitch
in classorg.eclipse.emf.ecore.util.Switch<T>
- Returns:
- the first non-null result returned by a
caseXXX
call. - Generated:
-
caseGrammar
public T caseGrammar(Grammar object)
Returns the result of interpreting the object as an instance of 'Grammar'. This implementation returns null; returning a non-null result will terminate the switch.- Parameters:
object
- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Grammar'.
- See Also:
doSwitch(EObject)
- Generated:
-
caseAbstractRule
public T caseAbstractRule(AbstractRule object)
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.- Parameters:
object
- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Abstract Rule'.
- See Also:
doSwitch(EObject)
- Generated:
-
caseAbstractMetamodelDeclaration
public T caseAbstractMetamodelDeclaration(AbstractMetamodelDeclaration object)
Returns the result of interpreting the object as an instance of 'Abstract Metamodel Declaration'. This implementation returns null; returning a non-null result will terminate the switch.- Parameters:
object
- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Abstract Metamodel Declaration'.
- See Also:
doSwitch(EObject)
- Generated:
-
caseGeneratedMetamodel
public T caseGeneratedMetamodel(GeneratedMetamodel object)
Returns the result of interpreting the object as an instance of 'Generated Metamodel'. This implementation returns null; returning a non-null result will terminate the switch.- Parameters:
object
- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Generated Metamodel'.
- See Also:
doSwitch(EObject)
- Generated:
-
caseReferencedMetamodel
public T caseReferencedMetamodel(ReferencedMetamodel object)
Returns the result of interpreting the object as an instance of 'Referenced Metamodel'. This implementation returns null; returning a non-null result will terminate the switch.- Parameters:
object
- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Referenced Metamodel'.
- See Also:
doSwitch(EObject)
- Generated:
-
caseParserRule
public T caseParserRule(ParserRule object)
Returns the result of interpreting the object as an instance of 'Parser Rule'. This implementation returns null; returning a non-null result will terminate the switch.- Parameters:
object
- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Parser Rule'.
- See Also:
doSwitch(EObject)
- Generated:
-
caseTypeRef
public T caseTypeRef(TypeRef object)
Returns the result of interpreting the object as an instance of 'Type Ref'. This implementation returns null; returning a non-null result will terminate the switch.- Parameters:
object
- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Type Ref'.
- See Also:
doSwitch(EObject)
- Generated:
-
caseAbstractElement
public T caseAbstractElement(AbstractElement object)
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.- Parameters:
object
- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Abstract Element'.
- See Also:
doSwitch(EObject)
- Generated:
-
caseAction
public T caseAction(Action object)
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.- Parameters:
object
- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Action'.
- See Also:
doSwitch(EObject)
- Generated:
-
caseKeyword
public T caseKeyword(Keyword object)
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.- Parameters:
object
- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Keyword'.
- See Also:
doSwitch(EObject)
- Generated:
-
caseRuleCall
public T caseRuleCall(RuleCall object)
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.- Parameters:
object
- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Rule Call'.
- See Also:
doSwitch(EObject)
- Generated:
-
caseAssignment
public T caseAssignment(Assignment object)
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.- Parameters:
object
- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Assignment'.
- See Also:
doSwitch(EObject)
- Generated:
-
caseCrossReference
public T caseCrossReference(CrossReference object)
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.- Parameters:
object
- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Cross Reference'.
- See Also:
doSwitch(EObject)
- Generated:
-
caseTerminalRule
public T caseTerminalRule(TerminalRule object)
Returns the result of interpreting the object as an instance of 'Terminal Rule'. This implementation returns null; returning a non-null result will terminate the switch.- Parameters:
object
- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Terminal Rule'.
- See Also:
doSwitch(EObject)
- Generated:
-
caseAbstractNegatedToken
public T caseAbstractNegatedToken(AbstractNegatedToken object)
Returns the result of interpreting the object as an instance of 'Abstract Negated Token'. This implementation returns null; returning a non-null result will terminate the switch.- Parameters:
object
- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Abstract Negated Token'.
- See Also:
doSwitch(EObject)
- Generated:
-
caseNegatedToken
public T caseNegatedToken(NegatedToken object)
Returns the result of interpreting the object as an instance of 'Negated Token'. This implementation returns null; returning a non-null result will terminate the switch.- Parameters:
object
- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Negated Token'.
- See Also:
doSwitch(EObject)
- Generated:
-
caseUntilToken
public T caseUntilToken(UntilToken object)
Returns the result of interpreting the object as an instance of 'Until Token'. This implementation returns null; returning a non-null result will terminate the switch.- Parameters:
object
- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Until Token'.
- See Also:
doSwitch(EObject)
- Generated:
-
caseWildcard
public T caseWildcard(Wildcard object)
Returns the result of interpreting the object as an instance of 'Wildcard'. This implementation returns null; returning a non-null result will terminate the switch.- Parameters:
object
- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Wildcard'.
- See Also:
doSwitch(EObject)
- Generated:
-
caseEnumRule
public T caseEnumRule(EnumRule object)
Returns the result of interpreting the object as an instance of 'Enum Rule'. This implementation returns null; returning a non-null result will terminate the switch.- Parameters:
object
- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Enum Rule'.
- See Also:
doSwitch(EObject)
- Generated:
-
caseEnumLiteralDeclaration
public T caseEnumLiteralDeclaration(EnumLiteralDeclaration object)
Returns the result of interpreting the object as an instance of 'Enum Literal Declaration'. This implementation returns null; returning a non-null result will terminate the switch.- Parameters:
object
- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Enum Literal Declaration'.
- See Also:
doSwitch(EObject)
- Generated:
-
caseAlternatives
public T caseAlternatives(Alternatives object)
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.- Parameters:
object
- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Alternatives'.
- See Also:
doSwitch(EObject)
- Generated:
-
caseUnorderedGroup
public T caseUnorderedGroup(UnorderedGroup object)
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.- Parameters:
object
- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Unordered Group'.
- See Also:
doSwitch(EObject)
- Generated:
-
caseGroup
public T caseGroup(Group object)
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.- Parameters:
object
- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Group'.
- See Also:
doSwitch(EObject)
- Generated:
-
caseCharacterRange
public T caseCharacterRange(CharacterRange object)
Returns the result of interpreting the object as an instance of 'Character Range'. This implementation returns null; returning a non-null result will terminate the switch.- Parameters:
object
- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Character Range'.
- See Also:
doSwitch(EObject)
- Generated:
-
caseCompoundElement
public T caseCompoundElement(CompoundElement object)
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.- Parameters:
object
- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Compound Element'.
- See Also:
doSwitch(EObject)
- Generated:
-
caseEOF
public T caseEOF(EOF object)
Returns the result of interpreting the object as an instance of 'EOF'. This implementation returns null; returning a non-null result will terminate the switch.- Parameters:
object
- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'EOF'.
- See Also:
doSwitch(EObject)
- Generated:
-
caseParameter
public T caseParameter(Parameter object)
Returns the result of interpreting the object as an instance of 'Parameter'. This implementation returns null; returning a non-null result will terminate the switch.- Parameters:
object
- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Parameter'.
- Since:
- 2.9
- See Also:
doSwitch(EObject)
- Generated:
-
caseNamedArgument
public T caseNamedArgument(NamedArgument object)
Returns the result of interpreting the object as an instance of 'Named Argument'. This implementation returns null; returning a non-null result will terminate the switch.- Parameters:
object
- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Named Argument'.
- Since:
- 2.9
- See Also:
doSwitch(EObject)
- Generated:
-
caseCondition
public T caseCondition(Condition object)
Returns the result of interpreting the object as an instance of 'Condition'. This implementation returns null; returning a non-null result will terminate the switch.- Parameters:
object
- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Condition'.
- Since:
- 2.9
- See Also:
doSwitch(EObject)
- Generated:
-
caseConjunction
public T caseConjunction(Conjunction object)
Returns the result of interpreting the object as an instance of 'Conjunction'. This implementation returns null; returning a non-null result will terminate the switch.- Parameters:
object
- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Conjunction'.
- Since:
- 2.9
- See Also:
doSwitch(EObject)
- Generated:
-
caseNegation
public T caseNegation(Negation object)
Returns the result of interpreting the object as an instance of 'Negation'. This implementation returns null; returning a non-null result will terminate the switch.- Parameters:
object
- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Negation'.
- Since:
- 2.9
- See Also:
doSwitch(EObject)
- Generated:
-
caseDisjunction
public T caseDisjunction(Disjunction object)
Returns the result of interpreting the object as an instance of 'Disjunction'. This implementation returns null; returning a non-null result will terminate the switch.- Parameters:
object
- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Disjunction'.
- Since:
- 2.9
- See Also:
doSwitch(EObject)
- Generated:
-
caseCompositeCondition
public T caseCompositeCondition(CompositeCondition object)
Returns the result of interpreting the object as an instance of 'Composite Condition'. This implementation returns null; returning a non-null result will terminate the switch.- Parameters:
object
- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Composite Condition'.
- Since:
- 2.9
- See Also:
doSwitch(EObject)
- Generated:
-
caseParameterReference
public T caseParameterReference(ParameterReference object)
Returns the result of interpreting the object as an instance of 'Parameter Reference'. This implementation returns null; returning a non-null result will terminate the switch.- Parameters:
object
- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Parameter Reference'.
- Since:
- 2.9
- See Also:
doSwitch(EObject)
- Generated:
-
caseLiteralCondition
public T caseLiteralCondition(LiteralCondition object)
Returns the result of interpreting the object as an instance of 'Literal Condition'. This implementation returns null; returning a non-null result will terminate the switch.- Parameters:
object
- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Literal Condition'.
- Since:
- 2.9
- See Also:
doSwitch(EObject)
- Generated:
-
caseAnnotation
public T caseAnnotation(Annotation object)
Returns the result of interpreting the object as an instance of 'Annotation'. This implementation returns null; returning a non-null result will terminate the switch.- Parameters:
object
- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'Annotation'.
- See Also:
doSwitch(EObject)
- Generated:
-
defaultCase
public T defaultCase(org.eclipse.emf.ecore.EObject object)
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 classorg.eclipse.emf.ecore.util.Switch<T>
- 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)
- Generated:
-
-