de.uka.ipd.sdq.stoex.util
Class StoexSwitch<T>

java.lang.Object
  extended by de.uka.ipd.sdq.stoex.util.StoexSwitch<T>
Direct Known Subclasses:
ExpressionInferTypeVisitor, ExpressionSolveVisitor, PCMStoExSwitch, StoExPrettyPrintVisitor, TypeCheckVisitor

public class StoexSwitch<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:
StoexPackage

Field Summary
static String copyright
           
protected static StoexPackage modelPackage
          The cached model package
 
Constructor Summary
StoexSwitch()
          Creates an instance of the switch.
 
Method Summary
 T caseAbstractNamedReference(AbstractNamedReference object)
          Returns the result of interpreting the object as an instance of 'Abstract Named Reference'.
 T caseAtom(Atom object)
          Returns the result of interpreting the object as an instance of 'Atom'.
 T caseBooleanExpression(BooleanExpression object)
          Returns the result of interpreting the object as an instance of 'Boolean Expression'.
 T caseBooleanOperatorExpression(BooleanOperatorExpression object)
          Returns the result of interpreting the object as an instance of 'Boolean Operator Expression'.
 T caseBoolLiteral(BoolLiteral object)
          Returns the result of interpreting the object as an instance of 'Bool Literal'.
 T caseCompareExpression(CompareExpression object)
          Returns the result of interpreting the object as an instance of 'Compare Expression'.
 T caseComparison(Comparison object)
          Returns the result of interpreting the object as an instance of 'Comparison'.
 T caseDoubleLiteral(DoubleLiteral object)
          Returns the result of interpreting the object as an instance of 'Double Literal'.
 T caseExpression(Expression object)
          Returns the result of interpreting the object as an instance of 'Expression'.
 T caseFunctionLiteral(FunctionLiteral object)
          Returns the result of interpreting the object as an instance of 'Function Literal'.
 T caseIfElse(IfElse object)
          Returns the result of interpreting the object as an instance of 'If Else'.
 T caseIfElseExpression(IfElseExpression object)
          Returns the result of interpreting the object as an instance of 'If Else Expression'.
 T caseIntLiteral(IntLiteral object)
          Returns the result of interpreting the object as an instance of 'Int Literal'.
 T caseNamespaceReference(NamespaceReference object)
          Returns the result of interpreting the object as an instance of 'Namespace Reference'.
 T caseNegativeExpression(NegativeExpression object)
          Returns the result of interpreting the object as an instance of 'Negative Expression'.
 T caseNotExpression(NotExpression object)
          Returns the result of interpreting the object as an instance of 'Not Expression'.
 T caseNumericLiteral(NumericLiteral object)
          Returns the result of interpreting the object as an instance of 'Numeric Literal'.
 T caseParenthesis(Parenthesis object)
          Returns the result of interpreting the object as an instance of 'Parenthesis'.
 T casePower(Power object)
          Returns the result of interpreting the object as an instance of 'Power'.
 T casePowerExpression(PowerExpression object)
          Returns the result of interpreting the object as an instance of 'Power Expression'.
 T caseProbabilityFunctionLiteral(ProbabilityFunctionLiteral object)
          Returns the result of interpreting the object as an instance of 'Probability Function Literal'.
 T caseProduct(Product object)
          Returns the result of interpreting the object as an instance of 'Product'.
 T caseProductExpression(ProductExpression object)
          Returns the result of interpreting the object as an instance of 'Product Expression'.
 T caseRandomVariable(RandomVariable object)
          Returns the result of interpreting the object as an instance of 'Random Variable'.
 T caseStringLiteral(StringLiteral object)
          Returns the result of interpreting the object as an instance of 'String Literal'.
 T caseTerm(Term object)
          Returns the result of interpreting the object as an instance of 'Term'.
 T caseTermExpression(TermExpression object)
          Returns the result of interpreting the object as an instance of 'Term Expression'.
 T caseUnary(Unary object)
          Returns the result of interpreting the object as an instance of 'Unary'.
 T caseUnitCarryingElement(UnitCarryingElement object)
          Returns the result of interpreting the object as an instance of 'Unit Carrying Element'.
 T caseVariable(Variable object)
          Returns the result of interpreting the object as an instance of 'Variable'.
 T caseVariableReference(VariableReference object)
          Returns the result of interpreting the object as an instance of 'Variable Reference'.
 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

copyright

public static final String copyright

See Also:
Constant Field Values

modelPackage

protected static StoexPackage modelPackage
The cached model package

Constructor Detail

StoexSwitch

public StoexSwitch()
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.

caseVariableReference

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

caseAbstractNamedReference

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

caseNamespaceReference

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

caseVariable

public T caseVariable(Variable 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)

caseAtom

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

caseUnary

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

casePower

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

caseProduct

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

caseTerm

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

caseComparison

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

caseBooleanExpression

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

caseIfElse

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

caseExpression

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

caseTermExpression

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

caseRandomVariable

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

caseProductExpression

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

caseProbabilityFunctionLiteral

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

caseParenthesis

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

caseNumericLiteral

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

caseIntLiteral

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

caseDoubleLiteral

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

caseCompareExpression

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

caseBoolLiteral

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

caseStringLiteral

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

casePowerExpression

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

caseBooleanOperatorExpression

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

caseNotExpression

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

caseNegativeExpression

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

caseFunctionLiteral

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

caseIfElseExpression

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

caseUnitCarryingElement

public T caseUnitCarryingElement(UnitCarryingElement object)
Returns the result of interpreting the object as an instance of 'Unit Carrying 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 'Unit Carrying Element'.
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)