org.eclipse.mofscript.MOFScriptModel.util
Class MOFScriptModelSwitch<T>

java.lang.Object
  extended by org.eclipse.mofscript.MOFScriptModel.util.MOFScriptModelSwitch<T>

public class MOFScriptModelSwitch<T>
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
static java.lang.String copyright
           
protected static MOFScriptModelPackage modelPackage
          The cached model package
 
Constructor Summary
MOFScriptModelSwitch()
          Creates an instance of the switch
 
Method Summary
 T caseAdvice(Advice object)
          Returns the result of interpreting the object as an instance of 'Advice'
 T caseArithmeticExpression(ArithmeticExpression object)
          Returns the result of interpreting the object as an instance of 'Arithmetic Expression'
 T caseBreakStatement(BreakStatement object)
          Returns the result of interpreting the object as an instance of 'Break Statement'
 T caseComparisonExpression(ComparisonExpression object)
          Returns the result of interpreting the object as an instance of 'Comparison Expression'
 T caseCreateExpression(CreateExpression object)
          Returns the result of interpreting the object as an instance of 'Create Expression'
 T caseCreateExpressionParameter(CreateExpressionParameter object)
          Returns the result of interpreting the object as an instance of 'Create Expression Parameter'
 T caseCreateStatement(CreateStatement object)
          Returns the result of interpreting the object as an instance of 'Create Statement'
 T caseDebugStatement(DebugStatement object)
          Returns the result of interpreting the object as an instance of 'Debug Statement'
 T caseExpression(Expression object)
          Returns the result of interpreting the object as an instance of 'Expression'
 T caseFileStatement(FileStatement object)
          Returns the result of interpreting the object as an instance of 'File Statement'
 T caseFunctionCall(FunctionCall object)
          Returns the result of interpreting the object as an instance of 'Function Call'
 T caseFunctionCallStatement(FunctionCallStatement object)
          Returns the result of interpreting the object as an instance of 'Function Call Statement'
 T caseGeneralAssignment(GeneralAssignment object)
          Returns the result of interpreting the object as an instance of 'General Assignment'
 T caseIfStatement(IfStatement object)
          Returns the result of interpreting the object as an instance of 'If Statement'
 T caseIteratorStatement(IteratorStatement object)
          Returns the result of interpreting the object as an instance of 'Iterator Statement'
 T caseLiteral(Literal object)
          Returns the result of interpreting the object as an instance of 'Literal'
 T caseLogicalExpression(LogicalExpression object)
          Returns the result of interpreting the object as an instance of 'Logical Expression'
 T caseM2MTrace(M2MTrace object)
          Returns the result of interpreting the object as an instance of 'M2M Trace'
 T caseMOFScriptAspect(MOFScriptAspect object)
          Returns the result of interpreting the object as an instance of 'MOF Script Aspect'
 T caseMOFScriptComment(MOFScriptComment object)
          Returns the result of interpreting the object as an instance of 'MOF Script Comment'
 T caseMOFScriptImport(MOFScriptImport object)
          Returns the result of interpreting the object as an instance of 'MOF Script Import'
 T caseMOFScriptObject(MOFScriptObject object)
          Returns the result of interpreting the object as an instance of 'MOF Script Object'
 T caseMOFScriptParameter(MOFScriptParameter object)
          Returns the result of interpreting the object as an instance of 'MOF Script Parameter'
 T caseMOFScriptSpecification(MOFScriptSpecification object)
          Returns the result of interpreting the object as an instance of 'MOF Script Specification'
 T caseMOFScriptStatement(MOFScriptStatement object)
          Returns the result of interpreting the object as an instance of 'MOF Script Statement'
 T caseMOFScriptStatementOwner(MOFScriptStatementOwner object)
          Returns the result of interpreting the object as an instance of 'MOF Script Statement Owner'
 T caseMOFScriptTransformation(MOFScriptTransformation object)
          Returns the result of interpreting the object as an instance of 'MOF Script Transformation'
 T casePointCut(PointCut object)
          Returns the result of interpreting the object as an instance of 'Point Cut'
 T casePointCutExpression(PointCutExpression object)
          Returns the result of interpreting the object as an instance of 'Point Cut Expression'
 T casePrintStatement(PrintStatement object)
          Returns the result of interpreting the object as an instance of 'Print Statement'
 T caseReference(Reference object)
          Returns the result of interpreting the object as an instance of 'Reference'
 T caseResultAssignment(ResultAssignment object)
          Returns the result of interpreting the object as an instance of 'Result Assignment'
 T caseReturnStatement(ReturnStatement object)
          Returns the result of interpreting the object as an instance of 'Return Statement'
 T caseSelectExpression(SelectExpression object)
          Returns the result of interpreting the object as an instance of 'Select Expression'
 T caseSimpleExpression(SimpleExpression object)
          Returns the result of interpreting the object as an instance of 'Simple Expression'
 T caseStatementBlock(StatementBlock object)
          Returns the result of interpreting the object as an instance of 'Statement Block'
 T caseTrace(Trace object)
          Returns the result of interpreting the object as an instance of 'Trace'
 T caseTransformationRule(TransformationRule object)
          Returns the result of interpreting the object as an instance of 'Transformation Rule'
 T caseValueExpression(ValueExpression object)
          Returns the result of interpreting the object as an instance of 'Value Expression'
 T caseVariableDeclaration(VariableDeclaration object)
          Returns the result of interpreting the object as an instance of 'Variable Declaration'
 T caseVariableDeclarationStatement(VariableDeclarationStatement object)
          Returns the result of interpreting the object as an instance of 'Variable Declaration Statement'
 T caseWhileStatement(WhileStatement object)
          Returns the result of interpreting the object as an instance of 'While Statement'
 T defaultCase(org.eclipse.emf.ecore.EObject object)
          Returns the result of interpreting the object as an instance of 'EObject'
protected  T 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
 T 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  T 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

copyright

public static final java.lang.String copyright

See Also:
Constant Field Values

modelPackage

protected static MOFScriptModelPackage modelPackage
The cached model package

Constructor Detail

MOFScriptModelSwitch

public MOFScriptModelSwitch()
Creates an instance of the switch.

Method Detail

doSwitch

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

caseMOFScriptStatementOwner

public T caseMOFScriptStatementOwner(MOFScriptStatementOwner object)
Returns the result of interpreting 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 interpreting the object as an instance of 'MOF Script Statement Owner'.
See Also:
doSwitch(EObject)

caseMOFScriptObject

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

caseMOFScriptComment

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

caseMOFScriptStatement

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

caseVariableDeclaration

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

caseValueExpression

public T caseValueExpression(ValueExpression object)
Returns the result of interpreting 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 interpreting the object as an instance of 'Value Expression'.
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)

caseStatementBlock

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

caseMOFScriptTransformation

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

caseMOFScriptParameter

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

caseMOFScriptImport

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

caseIteratorStatement

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

caseLogicalExpression

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

caseSimpleExpression

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

caseFunctionCall

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

caseCreateStatement

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

caseResultAssignment

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

caseGeneralAssignment

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

caseLiteral

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

caseReference

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

caseFunctionCallStatement

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

casePrintStatement

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

caseArithmeticExpression

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

caseFileStatement

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

caseComparisonExpression

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

caseIfStatement

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

caseMOFScriptSpecification

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

caseBreakStatement

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

caseWhileStatement

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

caseMOFScriptAspect

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

caseAdvice

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

casePointCut

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

casePointCutExpression

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

caseSelectExpression

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

caseCreateExpression

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

caseCreateExpressionParameter

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

caseReturnStatement

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

caseVariableDeclarationStatement

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

caseDebugStatement

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

caseTrace

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

caseM2MTrace

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

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.

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)