Package ca.ubc.stat.blang.blangDsl.util
Class BlangDslSwitch<T>
java.lang.Object
org.eclipse.emf.ecore.util.Switch<T>
ca.ubc.stat.blang.blangDsl.util.BlangDslSwitch<T>
public class BlangDslSwitch<T>
extends org.eclipse.emf.ecore.util.Switch<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.
- See Also:
BlangDslPackage
-
Field Summary
Fields Modifier and Type Field Description protected static BlangDslPackage
modelPackage
The cached model package -
Constructor Summary
Constructors Constructor Description BlangDslSwitch()
Creates an instance of the switch. -
Method Summary
Modifier and Type Method Description T
caseBlangDist(BlangDist object)
Returns the result of interpreting the object as an instance of 'Blang Dist'.T
caseBlangModel(BlangModel object)
Returns the result of interpreting the object as an instance of 'Blang Model'.T
caseDependency(Dependency object)
Returns the result of interpreting the object as an instance of 'Dependency'.T
caseDistributionTypeSpecification(DistributionTypeSpecification object)
Returns the result of interpreting the object as an instance of 'Distribution Type Specification'.T
caseFactorDeclaration(FactorDeclaration object)
Returns the result of interpreting the object as an instance of 'Factor Declaration'.T
caseForLoop(ForLoop object)
Returns the result of interpreting the object as an instance of 'For Loop'.T
caseIfElse(IfElse object)
Returns the result of interpreting the object as an instance of 'If Else'.T
caseInitializerDependency(InitializerDependency object)
Returns the result of interpreting the object as an instance of 'Initializer Dependency'.T
caseInstantiatedDistribution(InstantiatedDistribution object)
Returns the result of interpreting the object as an instance of 'Instantiated Distribution'.T
caseJavaDist(JavaDist object)
Returns the result of interpreting the object as an instance of 'Java Dist'.T
caseLawNode(LawNode object)
Returns the result of interpreting the object as an instance of 'Law Node'.T
caseLogScaleFactorDeclaration(LogScaleFactorDeclaration object)
Returns the result of interpreting the object as an instance of 'Log Scale Factor Declaration'.T
caseSimpleDependency(SimpleDependency object)
Returns the result of interpreting the object as an instance of 'Simple Dependency'.T
caseVariableDeclaration(VariableDeclaration object)
Returns the result of interpreting the object as an instance of 'Variable Declaration'.T
caseVariableDeclarationComponent(VariableDeclarationComponent object)
Returns the result of interpreting the object as an instance of 'Variable Declaration Component'.T
caseVariableName(VariableName object)
Returns the result of interpreting the object as an instance of 'Variable Name'.T
defaultCase(org.eclipse.emf.ecore.EObject object)
Returns the result of interpreting the object as an instance of 'EObject'.protected T
doSwitch(int classifierID, org.eclipse.emf.ecore.EObject theEObject)
CallscaseXXX
for each class of the model until one returns a non null result; it yields that result.protected boolean
isSwitchFor(org.eclipse.emf.ecore.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 Details
-
modelPackage
The cached model package
-
-
Constructor Details
-
BlangDslSwitch
public BlangDslSwitch()Creates an instance of the switch.
-
-
Method Details
-
isSwitchFor
protected boolean isSwitchFor(org.eclipse.emf.ecore.EPackage ePackage)Checks whether this is a switch for the given package.- Specified by:
isSwitchFor
in classorg.eclipse.emf.ecore.util.Switch<T>
- Parameters:
ePackage
- the package in question.- Returns:
- whether this is a switch for the given package.
-
doSwitch
CallscaseXXX
for each class of the model until one returns a non null result; it yields that result.- Overrides:
doSwitch
in classorg.eclipse.emf.ecore.util.Switch<T>
- Returns:
- the first non-null result returned by a
caseXXX
call.
-
caseBlangModel
Returns the result of interpreting the object as an instance of 'Blang Model'. 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 'Blang Model'.
- See Also:
doSwitch(EObject)
-
caseVariableDeclaration
Returns the result of interpreting the object as an instance of 'Variable 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 'Variable Declaration'.
- See Also:
doSwitch(EObject)
-
caseVariableName
Returns the result of interpreting the object as an instance of 'Variable Name'. 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 'Variable Name'.
- See Also:
doSwitch(EObject)
-
caseVariableDeclarationComponent
Returns the result of interpreting the object as an instance of 'Variable Declaration 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 'Variable Declaration Component'.
- See Also:
doSwitch(EObject)
-
caseLawNode
Returns the result of interpreting the object as an instance of 'Law 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 'Law Node'.
- See Also:
doSwitch(EObject)
-
caseLogScaleFactorDeclaration
Returns the result of interpreting the object as an instance of 'Log Scale Factor 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 'Log Scale Factor Declaration'.
- See Also:
doSwitch(EObject)
-
caseForLoop
Returns the result of interpreting the object as an instance of 'For Loop'. 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 'For Loop'.
- See Also:
doSwitch(EObject)
-
caseIfElse
Returns the result of interpreting the object as an instance of 'If Else'. 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 'If Else'.
- See Also:
doSwitch(EObject)
-
caseFactorDeclaration
Returns the result of interpreting the object as an instance of 'Factor 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 'Factor Declaration'.
- See Also:
doSwitch(EObject)
-
caseInstantiatedDistribution
Returns the result of interpreting the object as an instance of 'Instantiated Distribution'. 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 'Instantiated Distribution'.
- See Also:
doSwitch(EObject)
-
caseDistributionTypeSpecification
Returns the result of interpreting the object as an instance of 'Distribution Type Specification'. 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 'Distribution Type Specification'.
- See Also:
doSwitch(EObject)
-
caseBlangDist
Returns the result of interpreting the object as an instance of 'Blang Dist'. 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 'Blang Dist'.
- See Also:
doSwitch(EObject)
-
caseJavaDist
Returns the result of interpreting the object as an instance of 'Java Dist'. 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 'Java Dist'.
- See Also:
doSwitch(EObject)
-
caseDependency
Returns the result of interpreting the object as an instance of 'Dependency'. 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 'Dependency'.
- See Also:
doSwitch(EObject)
-
caseInitializerDependency
Returns the result of interpreting the object as an instance of 'Initializer Dependency'. 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 'Initializer Dependency'.
- See Also:
doSwitch(EObject)
-
caseSimpleDependency
Returns the result of interpreting the object as an instance of 'Simple Dependency'. 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 'Simple Dependency'.
- See Also:
doSwitch(EObject)
-
defaultCase
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.- Overrides:
defaultCase
in classorg.eclipse.emf.ecore.util.Switch<T>
- Parameters:
object
- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'EObject'.
- See Also:
Switch.doSwitch(org.eclipse.emf.ecore.EObject)
-