Class TypesSwitch<T>
java.lang.Object
org.eclipse.emf.ecore.util.Switch<T>
org.emftext.language.java.types.util.TypesSwitch<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:
- Generated class or method.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncaseAnnotable
(Annotable object) Returns the result of interpreting the object as an instance of 'Annotable'.caseArrayTypeable
(ArrayTypeable object) Returns the result of interpreting the object as an instance of 'Array Typeable'.caseBoolean
(Boolean object) Returns the result of interpreting the object as an instance of 'Boolean'.Returns the result of interpreting the object as an instance of 'Byte'.Returns the result of interpreting the object as an instance of 'Char'.Returns the result of interpreting the object as an instance of 'Classifier Reference'.caseCommentable
(Commentable object) Returns the result of interpreting the object as an instance of 'Commentable'.caseDouble
(Double object) Returns the result of interpreting the object as an instance of 'Double'.Returns the result of interpreting the object as an instance of 'Float'.caseInferableType
(InferableType object) Returns the result of interpreting the object as an instance of 'Inferable Type'.Returns the result of interpreting the object as an instance of 'Int'.Returns the result of interpreting the object as an instance of 'Long'.Returns the result of interpreting the object as an instance of 'Namespace Aware Element'.Returns the result of interpreting the object as an instance of 'Namespace Classifier Reference'.casePrimitiveType
(PrimitiveType object) Returns the result of interpreting the object as an instance of 'Primitive Type'.Returns the result of interpreting the object as an instance of 'Short'.Returns the result of interpreting the object as an instance of 'Type'.caseTypeArgumentable
(TypeArgumentable object) Returns the result of interpreting the object as an instance of 'Type Argumentable'.caseTypedElement
(TypedElement object) Returns the result of interpreting the object as an instance of 'Typed Element'.Returns the result of interpreting the object as an instance of 'Typed Element Extension'.caseTypeReference
(TypeReference object) Returns the result of interpreting the object as an instance of 'Type Reference'.Returns the result of interpreting the object as an instance of 'Void'.defaultCase
(EObject object) Returns the result of interpreting the object as an instance of 'EObject'.protected T
CallscaseXXX
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.
-
Field Details
-
modelPackage
The cached model package- Generated class or method.
-
-
Constructor Details
-
TypesSwitch
public TypesSwitch()Creates an instance of the switch.- Generated class or method.
-
-
Method Details
-
isSwitchFor
Checks whether this is a switch for the given package.- Specified by:
isSwitchFor
in classSwitch<T>
- Parameters:
ePackage
- the package in question.- Returns:
- whether this is a switch for the given package.
- Generated class or method.
-
doSwitch
CallscaseXXX
for each class of the model until one returns a non null result; it yields that result. -
caseType
Returns the result of interpreting the object as an instance of '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 'Type'.
- See Also:
- Generated class or method.
-
caseTypedElement
Returns the result of interpreting the object as an instance of 'Typed 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 'Typed Element'.
- See Also:
- Generated class or method.
-
caseTypedElementExtension
Returns the result of interpreting the object as an instance of 'Typed Element Extension'. 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 'Typed Element Extension'.
- See Also:
- Generated class or method.
-
caseTypeReference
Returns the result of interpreting the object as an instance of 'Type Reference'. 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 Reference'.
- See Also:
- Generated class or method.
-
caseClassifierReference
Returns the result of interpreting the object as an instance of 'Classifier Reference'. 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 'Classifier Reference'.
- See Also:
- Generated class or method.
-
caseNamespaceClassifierReference
Returns the result of interpreting the object as an instance of 'Namespace Classifier Reference'. 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 'Namespace Classifier Reference'.
- See Also:
- Generated class or method.
-
casePrimitiveType
Returns the result of interpreting the object as an instance of 'Primitive 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 'Primitive Type'.
- See Also:
- Generated class or method.
-
caseBoolean
Returns the result of interpreting the object as an instance of 'Boolean'. 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 'Boolean'.
- See Also:
- Generated class or method.
-
caseByte
Returns the result of interpreting the object as an instance of 'Byte'. 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 'Byte'.
- See Also:
- Generated class or method.
-
caseChar
Returns the result of interpreting the object as an instance of 'Char'. 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 'Char'.
- See Also:
- Generated class or method.
-
caseDouble
Returns the result of interpreting the object as an instance of 'Double'. 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 'Double'.
- See Also:
- Generated class or method.
-
caseFloat
Returns the result of interpreting the object as an instance of 'Float'. 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 'Float'.
- See Also:
- Generated class or method.
-
caseInt
Returns the result of interpreting the object as an instance of 'Int'. 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 'Int'.
- See Also:
- Generated class or method.
-
caseLong
Returns the result of interpreting the object as an instance of 'Long'. 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 'Long'.
- See Also:
- Generated class or method.
-
caseShort
Returns the result of interpreting the object as an instance of 'Short'. 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 'Short'.
- See Also:
- Generated class or method.
-
caseVoid
Returns the result of interpreting the object as an instance of 'Void'. 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 'Void'.
- See Also:
- Generated class or method.
-
caseInferableType
Returns the result of interpreting the object as an instance of 'Inferable 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 'Inferable Type'.
- See Also:
- Generated class or method.
-
caseCommentable
Returns the result of interpreting the object as an instance of 'Commentable'. 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 'Commentable'.
- See Also:
- Generated class or method.
-
caseArrayTypeable
Returns the result of interpreting the object as an instance of 'Array Typeable'. 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 'Array Typeable'.
- See Also:
- Generated class or method.
-
caseTypeArgumentable
Returns the result of interpreting the object as an instance of 'Type Argumentable'. 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 Argumentable'.
- See Also:
- Generated class or method.
-
caseAnnotable
Returns the result of interpreting the object as an instance of 'Annotable'. 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 'Annotable'.
- See Also:
- Generated class or method.
-
caseNamespaceAwareElement
Returns the result of interpreting the object as an instance of 'Namespace Aware 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 'Namespace Aware Element'.
- See Also:
- Generated class or method.
-
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 classSwitch<T>
- Parameters:
object
- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'EObject'.
- See Also:
- Generated class or method.
-