|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.emf.ecore.util.Switch<T>
org.eclipse.emf.ecore.xcore.util.XcoreSwitch<T>
public class XcoreSwitch<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.
XcorePackage| Field Summary | |
|---|---|
protected static XcorePackage |
modelPackage
The cached model package |
| Constructor Summary | |
|---|---|
XcoreSwitch()
Creates an instance of the switch |
|
| Method Summary | |
|---|---|
T |
caseXAnnotation(XAnnotation object)
Returns the result of interpreting the object as an instance of 'XAnnotation' |
T |
caseXAnnotationDirective(XAnnotationDirective object)
Returns the result of interpreting the object as an instance of 'XAnnotation Directive' |
T |
caseXAttribute(XAttribute object)
Returns the result of interpreting the object as an instance of 'XAttribute' |
T |
caseXClass(XClass object)
Returns the result of interpreting the object as an instance of 'XClass' |
T |
caseXClassifier(XClassifier object)
Returns the result of interpreting the object as an instance of 'XClassifier' |
T |
caseXDataType(XDataType object)
Returns the result of interpreting the object as an instance of 'XData Type' |
T |
caseXEnum(XEnum object)
Returns the result of interpreting the object as an instance of 'XEnum' |
T |
caseXEnumLiteral(XEnumLiteral object)
Returns the result of interpreting the object as an instance of 'XEnum Literal' |
T |
caseXGenericType(XGenericType object)
Returns the result of interpreting the object as an instance of 'XGeneric Type' |
T |
caseXImportDirective(XImportDirective object)
Returns the result of interpreting the object as an instance of 'XImport Directive' |
T |
caseXMember(XMember object)
Returns the result of interpreting the object as an instance of 'XMember' |
T |
caseXModelElement(XModelElement object)
Returns the result of interpreting the object as an instance of 'XModel Element' |
T |
caseXNamedElement(XNamedElement object)
Returns the result of interpreting the object as an instance of 'XNamed Element' |
T |
caseXOperation(XOperation object)
Returns the result of interpreting the object as an instance of 'XOperation' |
T |
caseXPackage(XPackage object)
Returns the result of interpreting the object as an instance of 'XPackage' |
T |
caseXParameter(XParameter object)
Returns the result of interpreting the object as an instance of 'XParameter' |
T |
caseXReference(XReference object)
Returns the result of interpreting the object as an instance of 'XReference' |
T |
caseXStringToStringMapEntry(java.util.Map.Entry<java.lang.String,java.lang.String> object)
Returns the result of interpreting the object as an instance of 'XString To String Map Entry' |
T |
caseXStructuralFeature(XStructuralFeature object)
Returns the result of interpreting the object as an instance of 'XStructural Feature' |
T |
caseXTypedElement(XTypedElement object)
Returns the result of interpreting the object as an instance of 'XTyped Element' |
T |
caseXTypeParameter(XTypeParameter object)
Returns the result of interpreting the object as an instance of 'XType Parameter' |
T |
defaultCase(EObject object)
Returns the result of interpreting the object as an instance of 'EObject' |
protected T |
doSwitch(int classifierID,
EObject theEObject)
Calls caseXXX for each class of the model until one returns a non null result; it yields that result |
protected boolean |
isSwitchFor(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 |
|---|
protected static XcorePackage modelPackage
| Constructor Detail |
|---|
public XcoreSwitch()
| Method Detail |
|---|
protected boolean isSwitchFor(EPackage ePackage)
isSwitchFor in class Switch<T>ePackage - the package of interest.
protected T doSwitch(int classifierID,
EObject theEObject)
caseXXX for each class of the model until one returns a non null result; it yields that result.
doSwitch in class Switch<T>classifierID - the classifier ID of the (super-)class of eObject relative to its defining EPackage.theEObject - the model object to pass to the appropriate caseXXX method.
caseXXX call.public T caseXAnnotation(XAnnotation object)
object - the target of the switch.
doSwitch(EObject)public T caseXAnnotationDirective(XAnnotationDirective object)
object - the target of the switch.
doSwitch(EObject)public T caseXAttribute(XAttribute object)
object - the target of the switch.
doSwitch(EObject)public T caseXClass(XClass object)
object - the target of the switch.
doSwitch(EObject)public T caseXClassifier(XClassifier object)
object - the target of the switch.
doSwitch(EObject)public T caseXDataType(XDataType object)
object - the target of the switch.
doSwitch(EObject)public T caseXEnum(XEnum object)
object - the target of the switch.
doSwitch(EObject)public T caseXEnumLiteral(XEnumLiteral object)
object - the target of the switch.
doSwitch(EObject)public T caseXModelElement(XModelElement object)
object - the target of the switch.
doSwitch(EObject)public T caseXNamedElement(XNamedElement object)
object - the target of the switch.
doSwitch(EObject)public T caseXOperation(XOperation object)
object - the target of the switch.
doSwitch(EObject)public T caseXPackage(XPackage object)
object - the target of the switch.
doSwitch(EObject)public T caseXParameter(XParameter object)
object - the target of the switch.
doSwitch(EObject)public T caseXReference(XReference object)
object - the target of the switch.
doSwitch(EObject)public T caseXStructuralFeature(XStructuralFeature object)
object - the target of the switch.
doSwitch(EObject)public T caseXTypedElement(XTypedElement object)
object - the target of the switch.
doSwitch(EObject)public T caseXStringToStringMapEntry(java.util.Map.Entry<java.lang.String,java.lang.String> object)
object - the target of the switch.
doSwitch(EObject)public T caseXGenericType(XGenericType object)
object - the target of the switch.
doSwitch(EObject)public T caseXImportDirective(XImportDirective object)
object - the target of the switch.
doSwitch(EObject)public T caseXMember(XMember object)
object - the target of the switch.
doSwitch(EObject)public T caseXTypeParameter(XTypeParameter object)
object - the target of the switch.
doSwitch(EObject)public T defaultCase(EObject object)
defaultCase in class Switch<T>object - the target of the switch.
Switch.doSwitch(org.eclipse.emf.ecore.EObject)
|
Copyright 2001-2012 IBM Corporation and others. All Rights Reserved. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||