Class ModelSwitch
java.lang.Object
org.eclipse.epf.diagram.model.util.ModelSwitch
public class ModelSwitch
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:
ModelPackage
-
Constructor Summary
Constructors Constructor Description ModelSwitch()
Creates an instance of the switch. -
Method Summary
Modifier and Type Method Description java.lang.Object
caseActivityDetailDiagram(ActivityDetailDiagram object)
Returns the result of interpreting the object as an instance of 'Activity Detail Diagram'.java.lang.Object
caseActivityDiagram(ActivityDiagram object)
Returns the result of interpreting the object as an instance of 'Activity Diagram'.java.lang.Object
caseDiagram(Diagram object)
Returns the result of interpreting the object as an instance of 'Diagram'.java.lang.Object
caseLink(Link object)
Returns the result of interpreting the object as an instance of 'Link'.java.lang.Object
caseLinkedObject(LinkedObject object)
Returns the result of interpreting the object as an instance of 'Linked Object'.java.lang.Object
caseNamedNode(NamedNode object)
Returns the result of interpreting the object as an instance of 'Named Node'.java.lang.Object
caseNode(Node object)
Returns the result of interpreting the object as an instance of 'Node'.java.lang.Object
caseNodeContainer(NodeContainer object)
Returns the result of interpreting the object as an instance of 'Node Container'.java.lang.Object
caseRoleNode(RoleNode object)
Returns the result of interpreting the object as an instance of 'Role Node'.java.lang.Object
caseRoleTaskComposite(RoleTaskComposite object)
Returns the result of interpreting the object as an instance of 'Role Task Composite'.java.lang.Object
caseTaskNode(TaskNode object)
Returns the result of interpreting the object as an instance of 'Task Node'.java.lang.Object
caseTypedNode(TypedNode object)
Returns the result of interpreting the object as an instance of 'Typed Node'.java.lang.Object
caseWorkBreakdownElementNode(WorkBreakdownElementNode object)
Returns the result of interpreting the object as an instance of 'Work Breakdown Element Node'.java.lang.Object
caseWorkProductComposite(WorkProductComposite object)
Returns the result of interpreting the object as an instance of 'Work Product Composite'.java.lang.Object
caseWorkProductDependencyDiagram(WorkProductDependencyDiagram object)
Returns the result of interpreting the object as an instance of 'Work Product Dependency Diagram'.java.lang.Object
caseWorkProductDescriptorNode(WorkProductDescriptorNode object)
Returns the result of interpreting the object as an instance of 'Work Product Descriptor Node'.java.lang.Object
caseWorkProductNode(WorkProductNode object)
Returns the result of interpreting the object as an instance of 'Work Product Node'.java.lang.Object
defaultCase(org.eclipse.emf.ecore.EObject object)
Returns the result of interpreting the object as an instance of 'EObject'.java.lang.Object
doSwitch(org.eclipse.emf.ecore.EObject theEObject)
CallscaseXXX
for each class of the model until one returns a non null result; it yields that result.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ModelSwitch
public ModelSwitch()Creates an instance of the switch.
-
-
Method Details
-
doSwitch
public java.lang.Object doSwitch(org.eclipse.emf.ecore.EObject theEObject)CallscaseXXX
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.
-
caseDiagram
Returns the result of interpreting the object as an instance of 'Diagram'. 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 'Diagram'.
- See Also:
doSwitch(EObject)
-
caseLink
Returns the result of interpreting the object as an instance of 'Link'. 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 'Link'.
- See Also:
doSwitch(EObject)
-
caseLinkedObject
Returns the result of interpreting the object as an instance of 'Linked 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 'Linked Object'.
- See Also:
doSwitch(EObject)
-
caseNamedNode
Returns the result of interpreting the object as an instance of 'Named Node'. 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 'Named Node'.
- See Also:
doSwitch(EObject)
-
caseNode
Returns the result of interpreting the object as an instance of 'Node'. 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 'Node'.
- See Also:
doSwitch(EObject)
-
caseActivityDiagram
Returns the result of interpreting the object as an instance of 'Activity Diagram'. 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 'Activity Diagram'.
- See Also:
doSwitch(EObject)
-
caseTypedNode
Returns the result of interpreting the object as an instance of 'Typed Node'. 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 'Typed Node'.
- See Also:
doSwitch(EObject)
-
caseWorkProductDependencyDiagram
Returns the result of interpreting the object as an instance of 'Work Product Dependency Diagram'. 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 'Work Product Dependency Diagram'.
- See Also:
doSwitch(EObject)
-
caseWorkProductNode
Returns the result of interpreting the object as an instance of 'Work Product Node'. 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 'Work Product Node'.
- See Also:
doSwitch(EObject)
-
caseActivityDetailDiagram
Returns the result of interpreting the object as an instance of 'Activity Detail Diagram'. 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 'Activity Detail Diagram'.
- See Also:
doSwitch(EObject)
-
caseNodeContainer
Returns the result of interpreting the object as an instance of 'Node Container'. 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 'Node Container'.
- See Also:
doSwitch(EObject)
-
caseRoleNode
Returns the result of interpreting the object as an instance of 'Role Node'. 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 'Role Node'.
- See Also:
doSwitch(EObject)
-
caseRoleTaskComposite
Returns the result of interpreting the object as an instance of 'Role Task Composite'. 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 'Role Task Composite'.
- See Also:
doSwitch(EObject)
-
caseTaskNode
Returns the result of interpreting the object as an instance of 'Task Node'. 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 'Task Node'.
- See Also:
doSwitch(EObject)
-
caseWorkProductDescriptorNode
Returns the result of interpreting the object as an instance of 'Work Product Descriptor Node'. 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 'Work Product Descriptor Node'.
- See Also:
doSwitch(EObject)
-
caseWorkBreakdownElementNode
Returns the result of interpreting the object as an instance of 'Work Breakdown Element Node'. 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 'Work Breakdown Element Node'.
- See Also:
doSwitch(EObject)
-
caseWorkProductComposite
Returns the result of interpreting the object as an instance of 'Work Product Composite'. 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 'Work Product Composite'.
- See Also:
doSwitch(EObject)
-
defaultCase
public java.lang.Object 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)
-