public abstract class Switch<T>
extends java.lang.Object
| Constructor and Description |
|---|
Switch() |
| Modifier and Type | Method and Description |
|---|---|
T |
defaultCase(EObject eObject)
Returns the result of interpreting the object as an instance of 'EObject'.
|
protected T |
doSwitch(EClass eClass,
EObject eObject)
Calls
caseXXX for each (super-)class of the model until one returns a non-null result;
it yields that result. |
T |
doSwitch(EObject eObject)
Dispatches the target object to the appropriate
caseXXX methods. |
protected T |
doSwitch(int classifierID,
EObject eObject)
Calls
caseXXX for each class of the model until one returns a non-null result;
it yields that result. |
protected abstract boolean |
isSwitchFor(EPackage ePackage)
Indicates whether the receiver is a switch for the specified package.
|
public T defaultCase(EObject eObject)
eObject - the target of the switch.doSwitch(org.eclipse.emf.ecore.EObject)protected T doSwitch(EClass eClass, EObject eObject)
caseXXX for each (super-)class of the model until one returns a non-null result;
it yields that result.eClass - the class or superclass of eObject to consider.
The class's containing EPackage determines whether the receiving switch object can handle the request.eObject - the model object to pass to the appropriate caseXXX.caseXXX call.public T doSwitch(EObject eObject)
caseXXX methods.eObject - the model object to pass to the appropriate caseXXX.caseXXX call.protected T doSwitch(int classifierID, EObject eObject)
caseXXX for each class of the model until one returns a non-null result;
it yields that result.classifierID - the classifier ID of the (super-)class of eObject relative to its defining EPackage.eObject - the model object to pass to the appropriate caseXXX method.caseXXX call.protected abstract boolean isSwitchFor(EPackage ePackage)
ePackage - the package of interest.true if the receiver is a switch for package.