org.eclipse.uml2.uml.profile.standard.util
Class StandardSwitch<T>

java.lang.Object
  extended by org.eclipse.emf.ecore.util.Switch<T>
      extended by org.eclipse.uml2.uml.profile.standard.util.StandardSwitch<T>

public class StandardSwitch<T>
extends org.eclipse.emf.ecore.util.Switch<T>

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:
StandardPackage

Field Summary
protected static StandardPackage modelPackage
          The cached model package
 
Constructor Summary
StandardSwitch()
          Creates an instance of the switch
 
Method Summary
 T caseAuxiliary(Auxiliary object)
          Returns the result of interpreting the object as an instance of 'Auxiliary'
 T caseBuildComponent(BuildComponent object)
          Returns the result of interpreting the object as an instance of 'Build Component'
 T caseCall(Call object)
          Returns the result of interpreting the object as an instance of 'Call'
 T caseCreate(Create object)
          Returns the result of interpreting the object as an instance of 'Create'
 T caseDerive(Derive object)
          Returns the result of interpreting the object as an instance of 'Derive'
 T caseDestroy(Destroy object)
          Returns the result of interpreting the object as an instance of 'Destroy'
 T caseDocument(Document object)
          Returns the result of interpreting the object as an instance of 'Document'
 T caseEntity(Entity object)
          Returns the result of interpreting the object as an instance of 'Entity'
 T caseExecutable(Executable object)
          Returns the result of interpreting the object as an instance of 'Executable'
 T caseFile(File object)
          Returns the result of interpreting the object as an instance of 'File'
 T caseFocus(Focus object)
          Returns the result of interpreting the object as an instance of 'Focus'
 T caseFramework(Framework object)
          Returns the result of interpreting the object as an instance of 'Framework'
 T caseImplement(Implement object)
          Returns the result of interpreting the object as an instance of 'Implement'
 T caseImplementationClass(ImplementationClass object)
          Returns the result of interpreting the object as an instance of 'Implementation Class'
 T caseInstantiate(Instantiate object)
          Returns the result of interpreting the object as an instance of 'Instantiate'
 T caseLibrary(Library object)
          Returns the result of interpreting the object as an instance of 'Library'
 T caseMetaclass(Metaclass object)
          Returns the result of interpreting the object as an instance of 'Metaclass'
 T caseMetamodel(Metamodel object)
          Returns the result of interpreting the object as an instance of 'Metamodel'
 T caseModelLibrary(ModelLibrary object)
          Returns the result of interpreting the object as an instance of 'Model Library'
 T caseProcess(Process object)
          Returns the result of interpreting the object as an instance of 'Process'
 T caseRealization(Realization object)
          Returns the result of interpreting the object as an instance of 'Realization'
 T caseRefine(Refine object)
          Returns the result of interpreting the object as an instance of 'Refine'
 T caseResponsibility(Responsibility object)
          Returns the result of interpreting the object as an instance of 'Responsibility'
 T caseScript(Script object)
          Returns the result of interpreting the object as an instance of 'Script'
 T caseSend(Send object)
          Returns the result of interpreting the object as an instance of 'Send'
 T caseService(Service object)
          Returns the result of interpreting the object as an instance of 'Service'
 T caseSource(Source object)
          Returns the result of interpreting the object as an instance of 'Source'
 T caseSpecification(Specification object)
          Returns the result of interpreting the object as an instance of 'Specification'
 T caseSubsystem(Subsystem object)
          Returns the result of interpreting the object as an instance of 'Subsystem'
 T caseSystemModel(SystemModel object)
          Returns the result of interpreting the object as an instance of 'System Model'
 T caseTrace(Trace object)
          Returns the result of interpreting the object as an instance of 'Trace'
 T caseType(Type object)
          Returns the result of interpreting the object as an instance of 'Type'
 T caseUtility(Utility object)
          Returns the result of interpreting the object as an instance of 'Utility'
 T defaultCase(org.eclipse.emf.ecore.EObject object)
          Returns the result of interpreting the object as an instance of 'EObject'
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
protected  boolean isSwitchFor(org.eclipse.emf.ecore.EPackage ePackage)
          Checks whether this is a switch for the given package
 
Methods inherited from class org.eclipse.emf.ecore.util.Switch
doSwitch, doSwitch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

modelPackage

protected static StandardPackage modelPackage
The cached model package

Constructor Detail

StandardSwitch

public StandardSwitch()
Creates an instance of the switch.

Method Detail

isSwitchFor

protected boolean isSwitchFor(org.eclipse.emf.ecore.EPackage ePackage)
Checks whether this is a switch for the given package.

Specified by:
isSwitchFor in class org.eclipse.emf.ecore.util.Switch<T>
Returns:
whether this is a switch for the given package.

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.

Overrides:
doSwitch in class org.eclipse.emf.ecore.util.Switch<T>
Returns:
the first non-null result returned by a caseXXX call.

caseAuxiliary

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

caseCall

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

caseCreate

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

caseDerive

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

caseDestroy

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

caseDocument

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

caseFile

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

caseEntity

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

caseExecutable

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

caseFocus

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

caseFramework

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

caseImplement

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

caseImplementationClass

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

caseInstantiate

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

caseLibrary

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

caseMetaclass

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

caseModelLibrary

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

caseProcess

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

caseRealization

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

caseRefine

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

caseResponsibility

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

caseScript

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

caseSend

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

caseService

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

caseSource

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

caseSpecification

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

caseSubsystem

public T caseSubsystem(Subsystem object)
Returns the result of interpreting the object as an instance of 'Subsystem'. 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 'Subsystem'.
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)

caseType

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

caseUtility

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

caseBuildComponent

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

caseMetamodel

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

caseSystemModel

public T caseSystemModel(SystemModel object)
Returns the result of interpreting the object as an instance of 'System 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 'System Model'.
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.

Overrides:
defaultCase in class org.eclipse.emf.ecore.util.Switch<T>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'EObject'.
See Also:
Switch.doSwitch(org.eclipse.emf.ecore.EObject)

Copyright 2003, 2014 IBM Corporation, CEA, and others.
All Rights Reserved.