io.sarl.lang.sarl.util
Class SarlSwitch<T>
Type Parameters:
T -
class SarlSwitch<T>
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:
SarlPackage
Generated:
This element is generated by the SARL compiler.
Field Summary
Modifier and type Field and description
protected static var SarlPackage modelPackage
The cached model package
Constructor Summary
Constructor and description
new
Creates an instance of the switch.
Action Summary
Modifier and type Action and description
T caseSarlAction(SarlAction)
Returns the result of interpreting the object as an instance of 'Action'.
T caseSarlAgent(SarlAgent)
Returns the result of interpreting the object as an instance of 'Agent'.
T caseSarlAnnotationType(SarlAnnotationType)
Returns the result of interpreting the object as an instance of 'Annotation Type'.
T caseSarlArtifact(SarlArtifact)
Returns the result of interpreting the object as an instance of 'Artifact'.
T caseSarlAssertExpression(SarlAssertExpression)
Returns the result of interpreting the object as an instance of 'Assert Expression'.
T caseSarlBehavior(SarlBehavior)
Returns the result of interpreting the object as an instance of 'Behavior'.
T caseSarlBehaviorUnit(SarlBehaviorUnit)
Returns the result of interpreting the object as an instance of 'Behavior Unit'.
T caseSarlBreakExpression(SarlBreakExpression)
Returns the result of interpreting the object as an instance of 'Break Expression'.
T caseSarlCapacity(SarlCapacity)
Returns the result of interpreting the object as an instance of 'Capacity'.
T caseSarlCapacityUses(SarlCapacityUses)
Returns the result of interpreting the object as an instance of 'Capacity Uses'.
T caseSarlCastedExpression(SarlCastedExpression)
Returns the result of interpreting the object as an instance of 'Casted Expression'.
T caseSarlClass(SarlClass)
Returns the result of interpreting the object as an instance of 'Class'.
T caseSarlConstructor(SarlConstructor)
Returns the result of interpreting the object as an instance of 'Constructor'.
T caseSarlContinueExpression(SarlContinueExpression)
Returns the result of interpreting the object as an instance of 'Continue Expression'.
T caseSarlEnumeration(SarlEnumeration)
Returns the result of interpreting the object as an instance of 'Enumeration'.
T caseSarlEnumLiteral(SarlEnumLiteral)
Returns the result of interpreting the object as an instance of 'Enum Literal'.
T caseSarlEvent(SarlEvent)
Returns the result of interpreting the object as an instance of 'Event'.
T caseSarlField(SarlField)
Returns the result of interpreting the object as an instance of 'Field'.
T caseSarlFormalParameter(SarlFormalParameter)
Returns the result of interpreting the object as an instance of 'Formal Parameter'.
T caseSarlInterface(SarlInterface)
Returns the result of interpreting the object as an instance of 'Interface'.
T caseSarlRequiredCapacity(SarlRequiredCapacity)
Returns the result of interpreting the object as an instance of 'Required Capacity'.
T caseSarlScript(SarlScript)
Returns the result of interpreting the object as an instance of 'Script'.
T caseSarlSkill(SarlSkill)
Returns the result of interpreting the object as an instance of 'Skill'.
T caseSarlSpace(SarlSpace)
Returns the result of interpreting the object as an instance of 'Space'.
T caseXCastedExpression(XCastedExpression)
Returns the result of interpreting the object as an instance of 'XCasted Expression'.
T caseXExpression(XExpression)
Returns the result of interpreting the object as an instance of 'XExpression'.
T caseXtendAnnotationTarget(XtendAnnotationTarget)
Returns the result of interpreting the object as an instance of 'Annotation Target'.
T caseXtendAnnotationType(XtendAnnotationType)
Returns the result of interpreting the object as an instance of 'Annotation Type'.
T caseXtendClass(XtendClass)
Returns the result of interpreting the object as an instance of 'Class'.
T caseXtendConstructor(XtendConstructor)
Returns the result of interpreting the object as an instance of 'Constructor'.
T caseXtendEnum(XtendEnum)
Returns the result of interpreting the object as an instance of 'Enum'.
T caseXtendEnumLiteral(XtendEnumLiteral)
Returns the result of interpreting the object as an instance of 'Enum Literal'.
T caseXtendExecutable(XtendExecutable)
Returns the result of interpreting the object as an instance of 'Executable'.
T caseXtendField(XtendField)
Returns the result of interpreting the object as an instance of 'Field'.
T caseXtendFile(XtendFile)
Returns the result of interpreting the object as an instance of 'File'.
T caseXtendFunction(XtendFunction)
Returns the result of interpreting the object as an instance of 'Function'.
T caseXtendInterface(XtendInterface)
Returns the result of interpreting the object as an instance of 'Interface'.
T caseXtendMember(XtendMember)
Returns the result of interpreting the object as an instance of 'Member'.
T caseXtendParameter(XtendParameter)
Returns the result of interpreting the object as an instance of 'Parameter'.
T caseXtendTypeDeclaration(XtendTypeDeclaration)
Returns the result of interpreting the object as an instance of 'Type Declaration'.
T defaultCase(EObject)
Returns the result of interpreting the object as an instance of 'EObject'.
protected T doSwitch(int,EObject)
Calls caseXXX for each class of the model until one returns a non null result; it yields that result.
protected boolean isSwitchFor(EPackage)
Checks whether this is a switch for the given package.
Field Details
modelPackage
protected static var modelPackage : SarlPackage
The cached model package
Generated:
This element is generated by the SARL compiler.
Constructor Details
new
new
Creates an instance of the switch.
Generated:
This element is generated by the SARL compiler.
Action Details
caseSarlAction(SarlAction)
def caseSarlAction(SarlAction) : T
Returns the result of interpreting the object as an instance of 'Action'. 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 ' Action '.
See:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseSarlAgent(SarlAgent)
def caseSarlAgent(SarlAgent) : T
Returns the result of interpreting the object as an instance of 'Agent'. 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 ' Agent '.
See:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseSarlAnnotationType(SarlAnnotationType)
def caseSarlAnnotationType(SarlAnnotationType) : T
Returns the result of interpreting the object as an instance of 'Annotation 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 ' Annotation Type '.
See:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseSarlArtifact(SarlArtifact)
def caseSarlArtifact(SarlArtifact) : T
Returns the result of interpreting the object as an instance of 'Artifact'. 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 '.
See:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseSarlAssertExpression(SarlAssertExpression)
def caseSarlAssertExpression(SarlAssertExpression) : T
Returns the result of interpreting the object as an instance of 'Assert Expression'. 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 ' Assert Expression '.
Since:
0.6
See:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseSarlBehavior(SarlBehavior)
def caseSarlBehavior(SarlBehavior) : T
Returns the result of interpreting the object as an instance of 'Behavior'. 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 ' Behavior '.
See:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseSarlBehaviorUnit(SarlBehaviorUnit)
def caseSarlBehaviorUnit(SarlBehaviorUnit) : T
Returns the result of interpreting the object as an instance of 'Behavior Unit'. 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 ' Behavior Unit '.
See:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseSarlBreakExpression(SarlBreakExpression)
def caseSarlBreakExpression(SarlBreakExpression) : T
Returns the result of interpreting the object as an instance of 'Break Expression'. 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 ' Break Expression '.
Since:
0.5
See:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseSarlCapacity(SarlCapacity)
def caseSarlCapacity(SarlCapacity) : T
Returns the result of interpreting the object as an instance of 'Capacity'. 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 ' Capacity '.
See:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseSarlCapacityUses(SarlCapacityUses)
def caseSarlCapacityUses(SarlCapacityUses) : T
Returns the result of interpreting the object as an instance of 'Capacity Uses'. 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 ' Capacity Uses '.
See:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseSarlCastedExpression(SarlCastedExpression)
def caseSarlCastedExpression(SarlCastedExpression) : T
Returns the result of interpreting the object as an instance of 'Casted Expression'. 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 ' Casted Expression '.
Since:
0.9
See:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseSarlClass(SarlClass)
def caseSarlClass(SarlClass) : T
Returns the result of interpreting the object as an instance of '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 ' Class '.
See:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseSarlConstructor(SarlConstructor)
def caseSarlConstructor(SarlConstructor) : T
Returns the result of interpreting the object as an instance of 'Constructor'. 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 ' Constructor '.
See:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseSarlContinueExpression(SarlContinueExpression)
def caseSarlContinueExpression(SarlContinueExpression) : T
Returns the result of interpreting the object as an instance of 'Continue Expression'. 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 ' Continue Expression '.
Since:
0.7
See:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseSarlEnumeration(SarlEnumeration)
def caseSarlEnumeration(SarlEnumeration) : T
Returns the result of interpreting the object as an instance of 'Enumeration'. 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 ' Enumeration '.
See:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseSarlEnumLiteral(SarlEnumLiteral)
def caseSarlEnumLiteral(SarlEnumLiteral) : T
Returns the result of interpreting the object as an instance of 'Enum Literal'. 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 ' Enum Literal '.
See:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseSarlEvent(SarlEvent)
def caseSarlEvent(SarlEvent) : T
Returns the result of interpreting the object as an instance of 'Event'. 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 ' Event '.
See:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseSarlField(SarlField)
def caseSarlField(SarlField) : T
Returns the result of interpreting the object as an instance of 'Field'. 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 ' Field '.
See:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseSarlFormalParameter(SarlFormalParameter)
def caseSarlFormalParameter(SarlFormalParameter) : T
Returns the result of interpreting the object as an instance of 'Formal Parameter'. 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 ' Formal Parameter '.
See:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseSarlInterface(SarlInterface)
def caseSarlInterface(SarlInterface) : T
Returns the result of interpreting the object as an instance of 'Interface'. 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 ' Interface '.
See:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseSarlRequiredCapacity(SarlRequiredCapacity)
def caseSarlRequiredCapacity(SarlRequiredCapacity) : T
Returns the result of interpreting the object as an instance of 'Required Capacity'. 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 ' Required Capacity '.
See:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseSarlScript(SarlScript)
def caseSarlScript(SarlScript) : T
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:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseSarlSkill(SarlSkill)
def caseSarlSkill(SarlSkill) : T
Returns the result of interpreting the object as an instance of 'Skill'. 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 ' Skill '.
See:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseSarlSpace(SarlSpace)
def caseSarlSpace(SarlSpace) : T
Returns the result of interpreting the object as an instance of 'Space'. 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 ' Space '.
See:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseXCastedExpression(XCastedExpression)
def caseXCastedExpression(XCastedExpression) : T
Returns the result of interpreting the object as an instance of 'XCasted Expression'. 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 ' XCasted Expression '.
Since:
2.7
See:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseXExpression(XExpression)
def caseXExpression(XExpression) : T
Returns the result of interpreting the object as an instance of 'XExpression'. 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 ' XExpression '.
Since:
2.7
See:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseXtendAnnotationTarget(XtendAnnotationTarget)
def caseXtendAnnotationTarget(XtendAnnotationTarget) : T
Returns the result of interpreting the object as an instance of 'Annotation Target'. 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 Target '.
See:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseXtendAnnotationType(XtendAnnotationType)
def caseXtendAnnotationType(XtendAnnotationType) : T
Returns the result of interpreting the object as an instance of 'Annotation 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 ' Annotation Type '.
See:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseXtendClass(XtendClass)
def caseXtendClass(XtendClass) : T
Returns the result of interpreting the object as an instance of '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 ' Class '.
See:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseXtendConstructor(XtendConstructor)
def caseXtendConstructor(XtendConstructor) : T
Returns the result of interpreting the object as an instance of 'Constructor'. 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 ' Constructor '.
See:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseXtendEnum(XtendEnum)
def caseXtendEnum(XtendEnum) : T
Returns the result of interpreting the object as an instance of 'Enum'. 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 ' Enum '.
See:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseXtendEnumLiteral(XtendEnumLiteral)
def caseXtendEnumLiteral(XtendEnumLiteral) : T
Returns the result of interpreting the object as an instance of 'Enum Literal'. 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 ' Enum Literal '.
See:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseXtendExecutable(XtendExecutable)
def caseXtendExecutable(XtendExecutable) : T
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:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseXtendField(XtendField)
def caseXtendField(XtendField) : T
Returns the result of interpreting the object as an instance of 'Field'. 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 ' Field '.
See:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseXtendFile(XtendFile)
def caseXtendFile(XtendFile) : T
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:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseXtendFunction(XtendFunction)
def caseXtendFunction(XtendFunction) : T
Returns the result of interpreting the object as an instance of 'Function'. 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 ' Function '.
See:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseXtendInterface(XtendInterface)
def caseXtendInterface(XtendInterface) : T
Returns the result of interpreting the object as an instance of 'Interface'. 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 ' Interface '.
See:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseXtendMember(XtendMember)
def caseXtendMember(XtendMember) : T
Returns the result of interpreting the object as an instance of 'Member'. 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 ' Member '.
See:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseXtendParameter(XtendParameter)
def caseXtendParameter(XtendParameter) : T
Returns the result of interpreting the object as an instance of 'Parameter'. 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 ' Parameter '.
See:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
caseXtendTypeDeclaration(XtendTypeDeclaration)
def caseXtendTypeDeclaration(XtendTypeDeclaration) : T
Returns the result of interpreting the object as an instance of 'Type Declaration'. 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 Declaration '.
See:
doSwitch(EObject) doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
defaultCase(EObject)
def defaultCase(EObject) : T
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:
doSwitch(EObject)
Generated:
This element is generated by the SARL compiler.
doSwitch(int,EObject)
protected def doSwitch(int,EObject) : T
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.
Generated:
This element is generated by the SARL compiler.
isSwitchFor(EPackage)
protected def isSwitchFor(EPackage) : boolean
Checks whether this is a switch for the given package.
Parameters:
ePackage - the package in question.
Returns:
whether this is a switch for the given package.
Generated:
This element is generated by the SARL compiler.