org.eclipse.ocl.expressions.util
Class ExpressionsSwitch<T>

java.lang.Object
  extended by org.eclipse.ocl.expressions.util.ExpressionsSwitch<T>

public class ExpressionsSwitch<T>
extends Object

The Switch for the model's inheritance hierarchy. It supports the call doSwitch(object) to invoke the caseXXX 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:
ExpressionsPackage

Field Summary
protected static ExpressionsPackage modelPackage
          The cached model package
 
Constructor Summary
ExpressionsSwitch()
          Creates an instance of the switch
 
Method Summary
<C,P> T
caseAssociationClassCallExp(AssociationClassCallExp<C,P> object)
          Returns the result of interpreting the object as an instance of 'Association Class Call Exp'
 T caseASTNode(ASTNode object)
          Returns the result of interpreting the object as an instance of 'AST Node'
<C> T
caseBooleanLiteralExp(BooleanLiteralExp<C> object)
          Returns the result of interpreting the object as an instance of 'Boolean Literal Exp'
<C> T
caseCallExp(CallExp<C> object)
          Returns the result of interpreting the object as an instance of 'Call Exp'
 T caseCallingASTNode(CallingASTNode object)
          Returns the result of interpreting the object as an instance of 'Calling AST Node'
<C> T
caseCollectionItem(CollectionItem<C> object)
          Returns the result of interpreting the object as an instance of 'Collection Item'
<C> T
caseCollectionLiteralExp(CollectionLiteralExp<C> object)
          Returns the result of interpreting the object as an instance of 'Collection Literal Exp'
<C> T
caseCollectionLiteralPart(CollectionLiteralPart<C> object)
          Returns the result of interpreting the object as an instance of 'Collection Literal Part'
<C> T
caseCollectionRange(CollectionRange<C> object)
          Returns the result of interpreting the object as an instance of 'Collection Range'
<C,EL> T
caseEnumLiteralExp(EnumLiteralExp<C,EL> object)
          Returns the result of interpreting the object as an instance of 'Enum Literal Exp'
<C> T
caseFeatureCallExp(FeatureCallExp<C> object)
          Returns the result of interpreting the object as an instance of 'Feature Call Exp'
<C> T
caseIfExp(IfExp<C> object)
          Returns the result of interpreting the object as an instance of 'If Exp'
<C> T
caseIntegerLiteralExp(IntegerLiteralExp<C> object)
          Returns the result of interpreting the object as an instance of 'Integer Literal Exp'
<C> T
caseInvalidLiteralExp(InvalidLiteralExp<C> object)
          Returns the result of interpreting the object as an instance of 'Invalid Literal Exp'
<C,PM> T
caseIterateExp(IterateExp<C,PM> object)
          Returns the result of interpreting the object as an instance of 'Iterate Exp'
<C,PM> T
caseIteratorExp(IteratorExp<C,PM> object)
          Returns the result of interpreting the object as an instance of 'Iterator Exp'
<C,PM> T
caseLetExp(LetExp<C,PM> object)
          Returns the result of interpreting the object as an instance of 'Let Exp'
<C> T
caseLiteralExp(LiteralExp<C> object)
          Returns the result of interpreting the object as an instance of 'Literal Exp'
<C,PM> T
caseLoopExp(LoopExp<C,PM> object)
          Returns the result of interpreting the object as an instance of 'Loop Exp'
<C,COA,SSA>
T
caseMessageExp(MessageExp<C,COA,SSA> object)
          Returns the result of interpreting the object as an instance of 'Message Exp'
<C,P> T
caseNavigationCallExp(NavigationCallExp<C,P> object)
          Returns the result of interpreting the object as an instance of 'Navigation Call Exp'
<C> T
caseNullLiteralExp(NullLiteralExp<C> object)
          Returns the result of interpreting the object as an instance of 'Null Literal Exp'
<C> T
caseNumericLiteralExp(NumericLiteralExp<C> object)
          Returns the result of interpreting the object as an instance of 'Numeric Literal Exp'
<C> T
caseOCLExpression(OCLExpression<C> object)
          Returns the result of interpreting the object as an instance of 'OCL Expression'
<C,O> T
caseOperationCallExp(OperationCallExp<C,O> object)
          Returns the result of interpreting the object as an instance of 'Operation Call Exp'
<C> T
casePrimitiveLiteralExp(PrimitiveLiteralExp<C> object)
          Returns the result of interpreting the object as an instance of 'Primitive Literal Exp'
<C,P> T
casePropertyCallExp(PropertyCallExp<C,P> object)
          Returns the result of interpreting the object as an instance of 'Property Call Exp'
<C> T
caseRealLiteralExp(RealLiteralExp<C> object)
          Returns the result of interpreting the object as an instance of 'Real Literal Exp'
<C,S> T
caseStateExp(StateExp<C,S> object)
          Returns the result of interpreting the object as an instance of 'State Exp'
<C> T
caseStringLiteralExp(StringLiteralExp<C> object)
          Returns the result of interpreting the object as an instance of 'String Literal Exp'
<C,P> T
caseTupleLiteralExp(TupleLiteralExp<C,P> object)
          Returns the result of interpreting the object as an instance of 'Tuple Literal Exp'
<C,P> T
caseTupleLiteralPart(TupleLiteralPart<C,P> object)
          Returns the result of interpreting the object as an instance of 'Tuple Literal Part'
 T caseTypedASTNode(TypedASTNode object)
          Returns the result of interpreting the object as an instance of 'Typed AST Node'
<C> T
caseTypedElement(TypedElement<C> object)
          Returns the result of interpreting the object as an instance of 'Typed Element'
<C> T
caseTypeExp(TypeExp<C> object)
          Returns the result of interpreting the object as an instance of 'Type Exp'
<C> T
caseUnlimitedNaturalLiteralExp(UnlimitedNaturalLiteralExp<C> object)
          Returns the result of interpreting the object as an instance of 'Unlimited Natural Literal Exp'
<C> T
caseUnspecifiedValueExp(UnspecifiedValueExp<C> object)
          Returns the result of interpreting the object as an instance of 'Unspecified Value Exp'
<C,PM> T
caseVariable(Variable<C,PM> object)
          Returns the result of interpreting the object as an instance of 'Variable'
<C,PM> T
caseVariableExp(VariableExp<C,PM> object)
          Returns the result of interpreting the object as an instance of 'Variable Exp'
 T caseVisitable(Visitable object)
          Returns the result of interpreting the object as an instance of 'Visitable'
 T defaultCase(EObject object)
          Returns the result of interpreting the object as an instance of 'EObject'
protected  T doSwitch(EClass theEClass, EObject theEObject)
          Calls caseXXX for each class of the model until one returns a non null result; it yields that result
 T doSwitch(EObject theEObject)
          Calls caseXXX for each class of the model until one returns a non null result; it yields that result
protected  T doSwitch(int classifierID, EObject theEObject)
          Calls caseXXX for each class of the model until one returns a non null result; it yields that result
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

modelPackage

protected static ExpressionsPackage modelPackage
The cached model package

Constructor Detail

ExpressionsSwitch

public ExpressionsSwitch()
Creates an instance of the switch.

Method Detail

doSwitch

public T doSwitch(EObject theEObject)
Calls caseXXX for each class of the model until one returns a non null result; it yields that result.

Returns:
the first non-null result returned by a caseXXX call.

doSwitch

protected T doSwitch(EClass theEClass,
                     EObject theEObject)
Calls caseXXX for each class of the model until one returns a non null result; it yields that result.

Returns:
the first non-null result returned by a caseXXX call.

doSwitch

protected T doSwitch(int classifierID,
                     EObject theEObject)
Calls caseXXX for each class of the model until one returns a non null result; it yields that result.

Returns:
the first non-null result returned by a caseXXX call.

caseAssociationClassCallExp

public <C,P> T caseAssociationClassCallExp(AssociationClassCallExp<C,P> object)
Returns the result of interpreting the object as an instance of 'Association Class Call Exp'. 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 'Association Class Call Exp'.
See Also:
doSwitch(EObject)

caseBooleanLiteralExp

public <C> T caseBooleanLiteralExp(BooleanLiteralExp<C> object)
Returns the result of interpreting the object as an instance of 'Boolean Literal Exp'. 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 'Boolean Literal Exp'.
See Also:
doSwitch(EObject)

caseCallExp

public <C> T caseCallExp(CallExp<C> object)
Returns the result of interpreting the object as an instance of 'Call Exp'. 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 'Call Exp'.
See Also:
doSwitch(EObject)

caseCollectionItem

public <C> T caseCollectionItem(CollectionItem<C> object)
Returns the result of interpreting the object as an instance of 'Collection Item'. 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 'Collection Item'.
See Also:
doSwitch(EObject)

caseCollectionLiteralExp

public <C> T caseCollectionLiteralExp(CollectionLiteralExp<C> object)
Returns the result of interpreting the object as an instance of 'Collection Literal Exp'. 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 'Collection Literal Exp'.
See Also:
doSwitch(EObject)

caseCollectionLiteralPart

public <C> T caseCollectionLiteralPart(CollectionLiteralPart<C> object)
Returns the result of interpreting the object as an instance of 'Collection Literal Part'. 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 'Collection Literal Part'.
See Also:
doSwitch(EObject)

caseCollectionRange

public <C> T caseCollectionRange(CollectionRange<C> object)
Returns the result of interpreting the object as an instance of 'Collection 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 'Collection Range'.
See Also:
doSwitch(EObject)

caseEnumLiteralExp

public <C,EL> T caseEnumLiteralExp(EnumLiteralExp<C,EL> object)
Returns the result of interpreting the object as an instance of 'Enum Literal Exp'. 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 Exp'.
See Also:
doSwitch(EObject)

caseFeatureCallExp

public <C> T caseFeatureCallExp(FeatureCallExp<C> object)
Returns the result of interpreting the object as an instance of 'Feature Call Exp'. 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 'Feature Call Exp'.
See Also:
doSwitch(EObject)

caseIfExp

public <C> T caseIfExp(IfExp<C> object)
Returns the result of interpreting the object as an instance of 'If Exp'. 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 'If Exp'.
See Also:
doSwitch(EObject)

caseIntegerLiteralExp

public <C> T caseIntegerLiteralExp(IntegerLiteralExp<C> object)
Returns the result of interpreting the object as an instance of 'Integer Literal Exp'. 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 'Integer Literal Exp'.
See Also:
doSwitch(EObject)

caseUnlimitedNaturalLiteralExp

public <C> T caseUnlimitedNaturalLiteralExp(UnlimitedNaturalLiteralExp<C> object)
Returns the result of interpreting the object as an instance of 'Unlimited Natural Literal Exp'. 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 'Unlimited Natural Literal Exp'.
See Also:
doSwitch(EObject)

caseInvalidLiteralExp

public <C> T caseInvalidLiteralExp(InvalidLiteralExp<C> object)
Returns the result of interpreting the object as an instance of 'Invalid Literal Exp'. 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 'Invalid Literal Exp'.
See Also:
doSwitch(EObject)

caseIterateExp

public <C,PM> T caseIterateExp(IterateExp<C,PM> object)
Returns the result of interpreting the object as an instance of 'Iterate Exp'. 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 'Iterate Exp'.
See Also:
doSwitch(EObject)

caseIteratorExp

public <C,PM> T caseIteratorExp(IteratorExp<C,PM> object)
Returns the result of interpreting the object as an instance of 'Iterator Exp'. 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 'Iterator Exp'.
See Also:
doSwitch(EObject)

caseLetExp

public <C,PM> T caseLetExp(LetExp<C,PM> object)
Returns the result of interpreting the object as an instance of 'Let Exp'. 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 'Let Exp'.
See Also:
doSwitch(EObject)

caseLiteralExp

public <C> T caseLiteralExp(LiteralExp<C> object)
Returns the result of interpreting the object as an instance of 'Literal Exp'. 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 Exp'.
See Also:
doSwitch(EObject)

caseLoopExp

public <C,PM> T caseLoopExp(LoopExp<C,PM> object)
Returns the result of interpreting the object as an instance of 'Loop Exp'. 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 'Loop Exp'.
See Also:
doSwitch(EObject)

caseMessageExp

public <C,COA,SSA> T caseMessageExp(MessageExp<C,COA,SSA> object)
Returns the result of interpreting the object as an instance of 'Message Exp'. 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 'Message Exp'.
See Also:
doSwitch(EObject)

caseNavigationCallExp

public <C,P> T caseNavigationCallExp(NavigationCallExp<C,P> object)
Returns the result of interpreting the object as an instance of 'Navigation Call Exp'. 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 'Navigation Call Exp'.
See Also:
doSwitch(EObject)

caseNullLiteralExp

public <C> T caseNullLiteralExp(NullLiteralExp<C> object)
Returns the result of interpreting the object as an instance of 'Null Literal Exp'. 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 'Null Literal Exp'.
See Also:
doSwitch(EObject)

caseNumericLiteralExp

public <C> T caseNumericLiteralExp(NumericLiteralExp<C> object)
Returns the result of interpreting the object as an instance of 'Numeric Literal Exp'. 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 'Numeric Literal Exp'.
See Also:
doSwitch(EObject)

caseOCLExpression

public <C> T caseOCLExpression(OCLExpression<C> object)
Returns the result of interpreting the object as an instance of 'OCL Expression'. 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 'OCL Expression'.
See Also:
doSwitch(EObject)

caseOperationCallExp

public <C,O> T caseOperationCallExp(OperationCallExp<C,O> object)
Returns the result of interpreting the object as an instance of 'Operation Call Exp'. 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 'Operation Call Exp'.
See Also:
doSwitch(EObject)

casePrimitiveLiteralExp

public <C> T casePrimitiveLiteralExp(PrimitiveLiteralExp<C> object)
Returns the result of interpreting the object as an instance of 'Primitive Literal Exp'. 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 'Primitive Literal Exp'.
See Also:
doSwitch(EObject)

casePropertyCallExp

public <C,P> T casePropertyCallExp(PropertyCallExp<C,P> object)
Returns the result of interpreting the object as an instance of 'Property Call Exp'. 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 'Property Call Exp'.
See Also:
doSwitch(EObject)

caseRealLiteralExp

public <C> T caseRealLiteralExp(RealLiteralExp<C> object)
Returns the result of interpreting the object as an instance of 'Real Literal Exp'. 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 'Real Literal Exp'.
See Also:
doSwitch(EObject)

caseStateExp

public <C,S> T caseStateExp(StateExp<C,S> object)
Returns the result of interpreting the object as an instance of 'State Exp'. 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 'State Exp'.
See Also:
doSwitch(EObject)

caseStringLiteralExp

public <C> T caseStringLiteralExp(StringLiteralExp<C> object)
Returns the result of interpreting the object as an instance of 'String Literal Exp'. 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 'String Literal Exp'.
See Also:
doSwitch(EObject)

caseTupleLiteralExp

public <C,P> T caseTupleLiteralExp(TupleLiteralExp<C,P> object)
Returns the result of interpreting the object as an instance of 'Tuple Literal Exp'. 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 'Tuple Literal Exp'.
See Also:
doSwitch(EObject)

caseTupleLiteralPart

public <C,P> T caseTupleLiteralPart(TupleLiteralPart<C,P> object)
Returns the result of interpreting the object as an instance of 'Tuple Literal Part'. 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 'Tuple Literal Part'.
See Also:
doSwitch(EObject)

caseTypeExp

public <C> T caseTypeExp(TypeExp<C> object)
Returns the result of interpreting the object as an instance of 'Type Exp'. 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 Exp'.
See Also:
doSwitch(EObject)

caseUnspecifiedValueExp

public <C> T caseUnspecifiedValueExp(UnspecifiedValueExp<C> object)
Returns the result of interpreting the object as an instance of 'Unspecified Value Exp'. 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 'Unspecified Value Exp'.
See Also:
doSwitch(EObject)

caseVariable

public <C,PM> T caseVariable(Variable<C,PM> object)
Returns the result of interpreting the object as an instance of 'Variable'. 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 'Variable'.
See Also:
doSwitch(EObject)

caseVariableExp

public <C,PM> T caseVariableExp(VariableExp<C,PM> object)
Returns the result of interpreting the object as an instance of 'Variable Exp'. 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 'Variable Exp'.
See Also:
doSwitch(EObject)

caseTypedElement

public <C> T caseTypedElement(TypedElement<C> object)
Returns the result of interpreting the object as an instance of 'Typed 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 'Typed Element'.
See Also:
doSwitch(EObject)

caseVisitable

public T caseVisitable(Visitable object)
Returns the result of interpreting the object as an instance of 'Visitable'. 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 'Visitable'.
See Also:
doSwitch(EObject)

caseASTNode

public T caseASTNode(ASTNode object)
Returns the result of interpreting the object as an instance of 'AST Node'. 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 'AST Node'.
See Also:
doSwitch(EObject)

caseCallingASTNode

public T caseCallingASTNode(CallingASTNode object)
Returns the result of interpreting the object as an instance of 'Calling AST Node'. 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 'Calling AST Node'.
See Also:
doSwitch(EObject)

caseTypedASTNode

public T caseTypedASTNode(TypedASTNode object)
Returns the result of interpreting the object as an instance of 'Typed AST Node'. 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 'Typed AST Node'.
See Also:
doSwitch(EObject)

defaultCase

public T defaultCase(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.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'EObject'.
See Also:
doSwitch(org.eclipse.emf.ecore.EObject)

Copyright 2002, 2007 IBM Corporation and others.
All Rights Reserved.