org.eclipse.uml2.codegen.ecore.genmodel.util
Class GenModelSwitch<T>

java.lang.Object
  extended by org.eclipse.uml2.codegen.ecore.genmodel.util.GenModelSwitch<T>

public class GenModelSwitch<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:
GenModelPackage

Field Summary
protected static GenModelPackage modelPackage
          The cached model package
 
Constructor Summary
GenModelSwitch()
          Creates an instance of the switch
 
Method Summary
 T caseGenBase_1(org.eclipse.emf.codegen.ecore.genmodel.GenBase object)
          Returns the result of interpreting the object as an instance of 'Gen Base'
 T caseGenBase(GenBase object)
          Returns the result of interpreting the object as an instance of 'Gen Base'
 T caseGenClass_1(org.eclipse.emf.codegen.ecore.genmodel.GenClass object)
          Returns the result of interpreting the object as an instance of 'Gen Class'
 T caseGenClass(GenClass object)
          Returns the result of interpreting the object as an instance of 'Gen Class'
 T caseGenClassifier_1(org.eclipse.emf.codegen.ecore.genmodel.GenClassifier object)
          Returns the result of interpreting the object as an instance of 'Gen Classifier'
 T caseGenClassifier(GenClassifier object)
          Returns the result of interpreting the object as an instance of 'Gen Classifier'
 T caseGenDataType_1(org.eclipse.emf.codegen.ecore.genmodel.GenDataType object)
          Returns the result of interpreting the object as an instance of 'Gen Data Type'
 T caseGenDataType(GenDataType object)
          Returns the result of interpreting the object as an instance of 'Gen Data Type'
 T caseGenEnum_1(org.eclipse.emf.codegen.ecore.genmodel.GenEnum object)
          Returns the result of interpreting the object as an instance of 'Gen Enum'
 T caseGenEnum(GenEnum object)
          Returns the result of interpreting the object as an instance of 'Gen Enum'
 T caseGenEnumLiteral_1(org.eclipse.emf.codegen.ecore.genmodel.GenEnumLiteral object)
          Returns the result of interpreting the object as an instance of 'Gen Enum Literal'
 T caseGenEnumLiteral(GenEnumLiteral object)
          Returns the result of interpreting the object as an instance of 'Gen Enum Literal'
 T caseGenFeature_1(org.eclipse.emf.codegen.ecore.genmodel.GenFeature object)
          Returns the result of interpreting the object as an instance of 'Gen Feature'
 T caseGenFeature(GenFeature object)
          Returns the result of interpreting the object as an instance of 'Gen Feature'
 T caseGenModel_1(org.eclipse.emf.codegen.ecore.genmodel.GenModel object)
          Returns the result of interpreting the object as an instance of 'Gen Model'
 T caseGenModel(GenModel object)
          Returns the result of interpreting the object as an instance of 'Gen Model'
 T caseGenOperation_1(org.eclipse.emf.codegen.ecore.genmodel.GenOperation object)
          Returns the result of interpreting the object as an instance of 'Gen Operation'
 T caseGenOperation(GenOperation object)
          Returns the result of interpreting the object as an instance of 'Gen Operation'
 T caseGenPackage_1(org.eclipse.emf.codegen.ecore.genmodel.GenPackage object)
          Returns the result of interpreting the object as an instance of 'Gen Package'
 T caseGenPackage(GenPackage object)
          Returns the result of interpreting the object as an instance of 'Gen Package'
 T caseGenParameter_1(org.eclipse.emf.codegen.ecore.genmodel.GenParameter object)
          Returns the result of interpreting the object as an instance of 'Gen Parameter'
 T caseGenParameter(GenParameter object)
          Returns the result of interpreting the object as an instance of 'Gen Parameter'
 T caseGenTypedElement_1(org.eclipse.emf.codegen.ecore.genmodel.GenTypedElement object)
          Returns the result of interpreting the object as an instance of 'Gen Typed Element'
 T caseGenTypedElement(GenTypedElement object)
          Returns the result of interpreting the object as an instance of 'Gen Typed Element'
 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

modelPackage

protected static GenModelPackage modelPackage
The cached model package

Constructor Detail

GenModelSwitch

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

caseGenBase

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

caseGenClass

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

caseGenClassifier

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

caseGenDataType

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

caseGenEnum

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

caseGenEnumLiteral

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

caseGenFeature

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

caseGenModel

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

caseGenOperation

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

caseGenPackage

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

caseGenParameter

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

caseGenTypedElement

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

caseGenBase_1

public T caseGenBase_1(org.eclipse.emf.codegen.ecore.genmodel.GenBase object)
Returns the result of interpreting the object as an instance of 'Gen Base'. 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 'Gen Base'.
See Also:
doSwitch(EObject)

caseGenClassifier_1

public T caseGenClassifier_1(org.eclipse.emf.codegen.ecore.genmodel.GenClassifier object)
Returns the result of interpreting the object as an instance of 'Gen Classifier'. 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 'Gen Classifier'.
See Also:
doSwitch(EObject)

caseGenClass_1

public T caseGenClass_1(org.eclipse.emf.codegen.ecore.genmodel.GenClass object)
Returns the result of interpreting the object as an instance of 'Gen Class'. 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 'Gen Class'.
See Also:
doSwitch(EObject)

caseGenDataType_1

public T caseGenDataType_1(org.eclipse.emf.codegen.ecore.genmodel.GenDataType object)
Returns the result of interpreting the object as an instance of 'Gen Data Type'. 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 'Gen Data Type'.
See Also:
doSwitch(EObject)

caseGenEnum_1

public T caseGenEnum_1(org.eclipse.emf.codegen.ecore.genmodel.GenEnum object)
Returns the result of interpreting the object as an instance of 'Gen Enum'. 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 'Gen Enum'.
See Also:
doSwitch(EObject)

caseGenEnumLiteral_1

public T caseGenEnumLiteral_1(org.eclipse.emf.codegen.ecore.genmodel.GenEnumLiteral object)
Returns the result of interpreting the object as an instance of 'Gen Enum 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 'Gen Enum Literal'.
See Also:
doSwitch(EObject)

caseGenTypedElement_1

public T caseGenTypedElement_1(org.eclipse.emf.codegen.ecore.genmodel.GenTypedElement object)
Returns the result of interpreting the object as an instance of 'Gen 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 'Gen Typed Element'.
See Also:
doSwitch(EObject)

caseGenFeature_1

public T caseGenFeature_1(org.eclipse.emf.codegen.ecore.genmodel.GenFeature object)
Returns the result of interpreting the object as an instance of 'Gen Feature'. 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 'Gen Feature'.
See Also:
doSwitch(EObject)

caseGenModel_1

public T caseGenModel_1(org.eclipse.emf.codegen.ecore.genmodel.GenModel object)
Returns the result of interpreting the object as an instance of 'Gen Model'. 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 'Gen Model'.
See Also:
doSwitch(EObject)

caseGenOperation_1

public T caseGenOperation_1(org.eclipse.emf.codegen.ecore.genmodel.GenOperation object)
Returns the result of interpreting the object as an instance of 'Gen Operation'. 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 'Gen Operation'.
See Also:
doSwitch(EObject)

caseGenPackage_1

public T caseGenPackage_1(org.eclipse.emf.codegen.ecore.genmodel.GenPackage object)
Returns the result of interpreting the object as an instance of 'Gen Package'. 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 'Gen Package'.
See Also:
doSwitch(EObject)

caseGenParameter_1

public T caseGenParameter_1(org.eclipse.emf.codegen.ecore.genmodel.GenParameter object)
Returns the result of interpreting the object as an instance of 'Gen 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 'Gen Parameter'.
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)

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