org.sintef.mofscript.MOFScriptModel.util
Class MOFScriptModelSwitch

java.lang.Object
  extended by org.sintef.mofscript.MOFScriptModel.util.MOFScriptModelSwitch

public class MOFScriptModelSwitch
extends java.lang.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:
MOFScriptModelPackage

Field Summary
protected static MOFScriptModelPackage modelPackage
          The cached model package
 
Constructor Summary
MOFScriptModelSwitch()
          Creates an instance of the switch
 
Method Summary
 java.lang.Object caseAdvice(Advice object)
          Returns the result of interpretting the object as an instance of 'Advice'
 java.lang.Object caseArithmeticExpression(ArithmeticExpression object)
          Returns the result of interpretting the object as an instance of 'Arithmetic Expression'
 java.lang.Object caseBreakStatement(BreakStatement object)
          Returns the result of interpretting the object as an instance of 'Break Statement'
 java.lang.Object caseComparisonExpression(ComparisonExpression object)
          Returns the result of interpretting the object as an instance of 'Comparison Expression'
 java.lang.Object caseCreateStatement(CreateStatement object)
          Returns the result of interpretting the object as an instance of 'Create Statement'
 java.lang.Object caseExpression(Expression object)
          Returns the result of interpretting the object as an instance of 'Expression'
 java.lang.Object caseFileStatement(FileStatement object)
          Returns the result of interpretting the object as an instance of 'File Statement'
 java.lang.Object caseFunctionCall(FunctionCall object)
          Returns the result of interpretting the object as an instance of 'Function Call'
 java.lang.Object caseFunctionCallStatement(FunctionCallStatement object)
          Returns the result of interpretting the object as an instance of 'Function Call Statement'
 java.lang.Object caseGeneralAssignment(GeneralAssignment object)
          Returns the result of interpretting the object as an instance of 'General Assignment'
 java.lang.Object caseIfStatement(IfStatement object)
          Returns the result of interpretting the object as an instance of 'If Statement'
 java.lang.Object caseIteratorStatement(IteratorStatement object)
          Returns the result of interpretting the object as an instance of 'Iterator Statement'
 java.lang.Object caseLiteral(Literal object)
          Returns the result of interpretting the object as an instance of 'Literal'
 java.lang.Object caseLogicalExpression(LogicalExpression object)
          Returns the result of interpretting the object as an instance of 'Logical Expression'
 java.lang.Object caseMOFScriptAspect(MOFScriptAspect object)
          Returns the result of interpretting the object as an instance of 'MOF Script Aspect'
 java.lang.Object caseMOFScriptComment(MOFScriptComment object)
          Returns the result of interpretting the object as an instance of 'MOF Script Comment'
 java.lang.Object caseMOFScriptImport(MOFScriptImport object)
          Returns the result of interpretting the object as an instance of 'MOF Script Import'
 java.lang.Object caseMOFScriptObject(MOFScriptObject object)
          Returns the result of interpretting the object as an instance of 'MOF Script Object'
 java.lang.Object caseMOFScriptParameter(MOFScriptParameter object)
          Returns the result of interpretting the object as an instance of 'MOF Script Parameter'
 java.lang.Object caseMOFScriptSpecification(MOFScriptSpecification object)
          Returns the result of interpretting the object as an instance of 'MOF Script Specification'
 java.lang.Object caseMOFScriptStatement(MOFScriptStatement object)
          Returns the result of interpretting the object as an instance of 'MOF Script Statement'
 java.lang.Object caseMOFScriptStatementOwner(MOFScriptStatementOwner object)
          Returns the result of interpretting the object as an instance of 'MOF Script Statement Owner'
 java.lang.Object caseMOFScriptTransformation(MOFScriptTransformation object)
          Returns the result of interpretting the object as an instance of 'MOF Script Transformation'
 java.lang.Object casePointCut(PointCut object)
          Returns the result of interpretting the object as an instance of 'Point Cut'
 java.lang.Object casePointCutExpression(PointCutExpression object)
          Returns the result of interpretting the object as an instance of 'Point Cut Expression'
 java.lang.Object casePrintStatement(PrintStatement object)
          Returns the result of interpretting the object as an instance of 'Print Statement'
 java.lang.Object caseReference(Reference object)
          Returns the result of interpretting the object as an instance of 'Reference'
 java.lang.Object caseResultAssignment(ResultAssignment object)
          Returns the result of interpretting the object as an instance of 'Result Assignment'
 java.lang.Object caseSelectExpression(SelectExpression object)
          Returns the result of interpretting the object as an instance of 'Select Expression'
 java.lang.Object caseSimpleExpression(SimpleExpression object)
          Returns the result of interpretting the object as an instance of 'Simple Expression'
 java.lang.Object caseStatementBlock(StatementBlock object)
          Returns the result of interpretting the object as an instance of 'Statement Block'
 java.lang.Object caseTransformationRule(TransformationRule object)
          Returns the result of interpretting the object as an instance of 'Transformation Rule'
 java.lang.Object caseValueExpression(ValueExpression object)
          Returns the result of interpretting the object as an instance of 'Value Expression'
 java.lang.Object caseVariableDeclaration(VariableDeclaration object)
          Returns the result of interpretting the object as an instance of 'Variable Declaration'
 java.lang.Object caseWhileStatement(WhileStatement object)
          Returns the result of interpretting the object as an instance of 'While Statement'
 java.lang.Object defaultCase(org.eclipse.emf.ecore.EObject object)
          Returns the result of interpretting the object as an instance of 'EObject'
protected  java.lang.Object doSwitch(org.eclipse.emf.ecore.EClass theEClass, 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
 java.lang.Object 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
protected  java.lang.Object doSwitch(int classifierID, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

modelPackage

protected static MOFScriptModelPackage modelPackage
The cached model package

Constructor Detail

MOFScriptModelSwitch

public MOFScriptModelSwitch()
Creates an instance of the switch.

Method Detail

doSwitch

public java.lang.Object 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.

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

doSwitch

protected java.lang.Object doSwitch(org.eclipse.emf.ecore.EClass theEClass,
                                    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.

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

doSwitch

protected java.lang.Object doSwitch(int classifierID,
                                    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.

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

caseTransformationRule

public java.lang.Object caseTransformationRule(TransformationRule object)
Returns the result of interpretting the object as an instance of 'Transformation 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 interpretting the object as an instance of 'Transformation Rule'.
See Also:
doSwitch(EObject)

caseMOFScriptStatementOwner

public java.lang.Object caseMOFScriptStatementOwner(MOFScriptStatementOwner object)
Returns the result of interpretting the object as an instance of 'MOF Script Statement Owner'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'MOF Script Statement Owner'.
See Also:
doSwitch(EObject)

caseMOFScriptObject

public java.lang.Object caseMOFScriptObject(MOFScriptObject object)
Returns the result of interpretting the object as an instance of 'MOF Script Object'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'MOF Script Object'.
See Also:
doSwitch(EObject)

caseMOFScriptStatement

public java.lang.Object caseMOFScriptStatement(MOFScriptStatement object)
Returns the result of interpretting the object as an instance of 'MOF Script Statement'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'MOF Script Statement'.
See Also:
doSwitch(EObject)

caseVariableDeclaration

public java.lang.Object caseVariableDeclaration(VariableDeclaration object)
Returns the result of interpretting the object as an instance of 'Variable 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 interpretting the object as an instance of 'Variable Declaration'.
See Also:
doSwitch(EObject)

caseValueExpression

public java.lang.Object caseValueExpression(ValueExpression object)
Returns the result of interpretting the object as an instance of 'Value 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 interpretting the object as an instance of 'Value Expression'.
See Also:
doSwitch(EObject)

caseExpression

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

caseMOFScriptTransformation

public java.lang.Object caseMOFScriptTransformation(MOFScriptTransformation object)
Returns the result of interpretting the object as an instance of 'MOF Script Transformation'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'MOF Script Transformation'.
See Also:
doSwitch(EObject)

caseMOFScriptImport

public java.lang.Object caseMOFScriptImport(MOFScriptImport object)
Returns the result of interpretting the object as an instance of 'MOF Script Import'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'MOF Script Import'.
See Also:
doSwitch(EObject)

caseMOFScriptParameter

public java.lang.Object caseMOFScriptParameter(MOFScriptParameter object)
Returns the result of interpretting the object as an instance of 'MOF Script 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 interpretting the object as an instance of 'MOF Script Parameter'.
See Also:
doSwitch(EObject)

caseIteratorStatement

public java.lang.Object caseIteratorStatement(IteratorStatement object)
Returns the result of interpretting the object as an instance of 'Iterator Statement'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'Iterator Statement'.
See Also:
doSwitch(EObject)

caseLogicalExpression

public java.lang.Object caseLogicalExpression(LogicalExpression object)
Returns the result of interpretting the object as an instance of 'Logical 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 interpretting the object as an instance of 'Logical Expression'.
See Also:
doSwitch(EObject)

caseSimpleExpression

public java.lang.Object caseSimpleExpression(SimpleExpression object)
Returns the result of interpretting the object as an instance of 'Simple 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 interpretting the object as an instance of 'Simple Expression'.
See Also:
doSwitch(EObject)

caseFunctionCall

public java.lang.Object caseFunctionCall(FunctionCall object)
Returns the result of interpretting the object as an instance of 'Function 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 interpretting the object as an instance of 'Function Call'.
See Also:
doSwitch(EObject)

caseCreateStatement

public java.lang.Object caseCreateStatement(CreateStatement object)
Returns the result of interpretting the object as an instance of 'Create Statement'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'Create Statement'.
See Also:
doSwitch(EObject)

caseResultAssignment

public java.lang.Object caseResultAssignment(ResultAssignment object)
Returns the result of interpretting the object as an instance of 'Result 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 interpretting the object as an instance of 'Result Assignment'.
See Also:
doSwitch(EObject)

caseGeneralAssignment

public java.lang.Object caseGeneralAssignment(GeneralAssignment object)
Returns the result of interpretting the object as an instance of 'General 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 interpretting the object as an instance of 'General Assignment'.
See Also:
doSwitch(EObject)

caseLiteral

public java.lang.Object caseLiteral(Literal object)
Returns the result of interpretting the object as an instance of '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 interpretting the object as an instance of 'Literal'.
See Also:
doSwitch(EObject)

caseReference

public java.lang.Object caseReference(Reference object)
Returns the result of interpretting the object as an instance of '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 interpretting the object as an instance of 'Reference'.
See Also:
doSwitch(EObject)

caseFunctionCallStatement

public java.lang.Object caseFunctionCallStatement(FunctionCallStatement object)
Returns the result of interpretting the object as an instance of 'Function Call Statement'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'Function Call Statement'.
See Also:
doSwitch(EObject)

casePrintStatement

public java.lang.Object casePrintStatement(PrintStatement object)
Returns the result of interpretting the object as an instance of 'Print Statement'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'Print Statement'.
See Also:
doSwitch(EObject)

caseArithmeticExpression

public java.lang.Object caseArithmeticExpression(ArithmeticExpression object)
Returns the result of interpretting the object as an instance of 'Arithmetic 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 interpretting the object as an instance of 'Arithmetic Expression'.
See Also:
doSwitch(EObject)

caseFileStatement

public java.lang.Object caseFileStatement(FileStatement object)
Returns the result of interpretting the object as an instance of 'File Statement'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'File Statement'.
See Also:
doSwitch(EObject)

caseComparisonExpression

public java.lang.Object caseComparisonExpression(ComparisonExpression object)
Returns the result of interpretting the object as an instance of 'Comparison 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 interpretting the object as an instance of 'Comparison Expression'.
See Also:
doSwitch(EObject)

caseIfStatement

public java.lang.Object caseIfStatement(IfStatement object)
Returns the result of interpretting the object as an instance of 'If Statement'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'If Statement'.
See Also:
doSwitch(EObject)

caseMOFScriptComment

public java.lang.Object caseMOFScriptComment(MOFScriptComment object)
Returns the result of interpretting the object as an instance of 'MOF Script Comment'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'MOF Script Comment'.
See Also:
doSwitch(EObject)

caseStatementBlock

public java.lang.Object caseStatementBlock(StatementBlock object)
Returns the result of interpretting the object as an instance of 'Statement Block'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'Statement Block'.
See Also:
doSwitch(EObject)

caseMOFScriptSpecification

public java.lang.Object caseMOFScriptSpecification(MOFScriptSpecification object)
Returns the result of interpretting the object as an instance of 'MOF Script Specification'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'MOF Script Specification'.
See Also:
doSwitch(EObject)

caseBreakStatement

public java.lang.Object caseBreakStatement(BreakStatement object)
Returns the result of interpretting the object as an instance of 'Break Statement'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'Break Statement'.
See Also:
doSwitch(EObject)

caseWhileStatement

public java.lang.Object caseWhileStatement(WhileStatement object)
Returns the result of interpretting the object as an instance of 'While Statement'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'While Statement'.
See Also:
doSwitch(EObject)

caseMOFScriptAspect

public java.lang.Object caseMOFScriptAspect(MOFScriptAspect object)
Returns the result of interpretting the object as an instance of 'MOF Script Aspect'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'MOF Script Aspect'.
See Also:
doSwitch(EObject)

caseAdvice

public java.lang.Object caseAdvice(Advice object)
Returns the result of interpretting the object as an instance of 'Advice'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'Advice'.
See Also:
doSwitch(EObject)

casePointCut

public java.lang.Object casePointCut(PointCut object)
Returns the result of interpretting the object as an instance of 'Point Cut'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpretting the object as an instance of 'Point Cut'.
See Also:
doSwitch(EObject)

casePointCutExpression

public java.lang.Object casePointCutExpression(PointCutExpression object)
Returns the result of interpretting the object as an instance of 'Point Cut 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 interpretting the object as an instance of 'Point Cut Expression'.
See Also:
doSwitch(EObject)

caseSelectExpression

public java.lang.Object caseSelectExpression(SelectExpression object)
Returns the result of interpretting the object as an instance of 'Select 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 interpretting the object as an instance of 'Select Expression'.
See Also:
doSwitch(EObject)

defaultCase

public java.lang.Object defaultCase(org.eclipse.emf.ecore.EObject object)
Returns the result of interpretting 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 interpretting the object as an instance of 'EObject'.
See Also:
doSwitch(org.eclipse.emf.ecore.EObject)