com.hammurapi.review.util
Class ReviewSwitch<T>

java.lang.Object
  extended by com.hammurapi.review.util.ReviewSwitch<T>

public class ReviewSwitch<T>
extends 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:
ReviewPackage

Field Summary
protected static ReviewPackage modelPackage
          The cached model package
 
Constructor Summary
ReviewSwitch()
          Creates an instance of the switch.
 
Method Summary
 T caseAnnotation(Annotation object)
          Returns the result of interpreting the object as an instance of 'Annotation'.
 T caseArtifactType(ArtifactType object)
          Returns the result of interpreting the object as an instance of 'Artifact Type'.
 T caseBaseline(Baseline object)
          Returns the result of interpreting the object as an instance of 'Baseline'.
 T caseCommonObject(CommonObject object)
          Returns the result of interpreting the object as an instance of 'Common Object'.
 T caseComponent(Component object)
          Returns the result of interpreting the object as an instance of 'Component'.
 T caseFactory(Factory object)
          Returns the result of interpreting the object as an instance of 'Factory'.
 T caseGovernanaceObject(GovernanaceObject object)
          Returns the result of interpreting the object as an instance of 'Governanace Object'.
 T caseGovernanceDomain(GovernanceDomain object)
          Returns the result of interpreting the object as an instance of 'Governance Domain'.
 T caseGovernor(Governor object)
          Returns the result of interpreting the object as an instance of 'Governor'.
 T caseInspector(Inspector object)
          Returns the result of interpreting the object as an instance of 'Inspector'.
 T caseInspectorCategory(InspectorCategory object)
          Returns the result of interpreting the object as an instance of 'Inspector Category'.
 T caseInspectorRelationship(InspectorRelationship object)
          Returns the result of interpreting the object as an instance of 'Inspector Relationship'.
 T caseInspectorSet(InspectorSet object)
          Returns the result of interpreting the object as an instance of 'Inspector Set'.
 T caseLanguageElement(LanguageElement object)
          Returns the result of interpreting the object as an instance of 'Language Element'.
 T caseMeasurement(Measurement object)
          Returns the result of interpreting the object as an instance of 'Measurement'.
 T caseModule(Module object)
          Returns the result of interpreting the object as an instance of 'Module'.
 T caseNamed(Named object)
          Returns the result of interpreting the object as an instance of 'Named'.
 T caseNamedObjectDefinition(NamedObjectDefinition object)
          Returns the result of interpreting the object as an instance of 'Named Object Definition'.
 T caseObjectDefinition(ObjectDefinition object)
          Returns the result of interpreting the object as an instance of 'Object Definition'.
 T caseObservation(Observation object)
          Returns the result of interpreting the object as an instance of 'Observation'.
 T caseOrganization(Organization object)
          Returns the result of interpreting the object as an instance of 'Organization'.
 T caseParty(Party object)
          Returns the result of interpreting the object as an instance of 'Party'.
 T casePropertySource(PropertySource object)
          Returns the result of interpreting the object as an instance of 'Property Source'.
 T caseReport(Report object)
          Returns the result of interpreting the object as an instance of 'Report'.
 T caseRepository(Repository object)
          Returns the result of interpreting the object as an instance of 'Repository'.
 T caseRevision(Revision object)
          Returns the result of interpreting the object as an instance of 'Revision'.
 T caseTagged(Tagged object)
          Returns the result of interpreting the object as an instance of 'Tagged'.
 T caseTool(Tool object)
          Returns the result of interpreting the object as an instance of 'Tool'.
 T caseToolVersion(ToolVersion object)
          Returns the result of interpreting the object as an instance of 'Tool Version'.
 T caseViolation(Violation object)
          Returns the result of interpreting the object as an instance of 'Violation'.
 T caseWaiver(Waiver object)
          Returns the result of interpreting the object as an instance of 'Waiver'.
 T caseWarning(Warning object)
          Returns the result of interpreting the object as an instance of 'Warning'.
 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 ReviewPackage modelPackage
The cached model package

Constructor Detail

ReviewSwitch

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

caseObservation

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

caseViolation

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

caseWarning

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

caseMeasurement

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

caseAnnotation

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

caseRepository

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

caseRevision

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

caseBaseline

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

caseReport

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

caseInspectorSet

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

caseInspector

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

caseInspectorCategory

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

caseComponent

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

caseModule

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

caseLanguageElement

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

caseWaiver

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

caseGovernanceDomain

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

caseArtifactType

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

caseTool

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

caseToolVersion

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

caseGovernanaceObject

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

caseGovernor

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

caseInspectorRelationship

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

caseCommonObject

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

caseFactory

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

caseNamed

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

casePropertySource

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

caseObjectDefinition

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

caseNamedObjectDefinition

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

caseTagged

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

caseParty

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

caseOrganization

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