Class TypesSwitch<T>
- java.lang.Object
-
- org.eclipse.emf.ecore.util.Switch<T>
-
- org.emftext.language.java.types.util.TypesSwitch<T>
-
public class TypesSwitch<T> extends Switch<T>
The Switch for the model's inheritance hierarchy. It supports the calldoSwitch(object)
to invoke thecaseXXX
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:
TypesPackage
- Generated class or method.
-
-
Field Summary
Fields Modifier and Type Field Description protected static TypesPackage
modelPackage
The cached model package
-
Constructor Summary
Constructors Constructor Description TypesSwitch()
Creates an instance of the switch.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
caseAnnotable(Annotable object)
Returns the result of interpreting the object as an instance of 'Annotable'.T
caseArrayTypeable(ArrayTypeable object)
Returns the result of interpreting the object as an instance of 'Array Typeable'.T
caseBoolean(Boolean object)
Returns the result of interpreting the object as an instance of 'Boolean'.T
caseByte(Byte object)
Returns the result of interpreting the object as an instance of 'Byte'.T
caseChar(Char object)
Returns the result of interpreting the object as an instance of 'Char'.T
caseClassifierReference(ClassifierReference object)
Returns the result of interpreting the object as an instance of 'Classifier Reference'.T
caseCommentable(Commentable object)
Returns the result of interpreting the object as an instance of 'Commentable'.T
caseDouble(Double object)
Returns the result of interpreting the object as an instance of 'Double'.T
caseFloat(Float object)
Returns the result of interpreting the object as an instance of 'Float'.T
caseInferableType(InferableType object)
Returns the result of interpreting the object as an instance of 'Inferable Type'.T
caseInt(Int object)
Returns the result of interpreting the object as an instance of 'Int'.T
caseLong(Long object)
Returns the result of interpreting the object as an instance of 'Long'.T
caseNamespaceAwareElement(NamespaceAwareElement object)
Returns the result of interpreting the object as an instance of 'Namespace Aware Element'.T
caseNamespaceClassifierReference(NamespaceClassifierReference object)
Returns the result of interpreting the object as an instance of 'Namespace Classifier Reference'.T
casePrimitiveType(PrimitiveType object)
Returns the result of interpreting the object as an instance of 'Primitive Type'.T
caseShort(Short object)
Returns the result of interpreting the object as an instance of 'Short'.T
caseType(Type object)
Returns the result of interpreting the object as an instance of 'Type'.T
caseTypeArgumentable(TypeArgumentable object)
Returns the result of interpreting the object as an instance of 'Type Argumentable'.T
caseTypedElement(TypedElement object)
Returns the result of interpreting the object as an instance of 'Typed Element'.T
caseTypeReference(TypeReference object)
Returns the result of interpreting the object as an instance of 'Type Reference'.T
caseVoid(Void object)
Returns the result of interpreting the object as an instance of 'Void'.T
defaultCase(EObject object)
Returns the result of interpreting the object as an instance of 'EObject'.protected T
doSwitch(int classifierID, EObject theEObject)
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 Detail
-
modelPackage
protected static TypesPackage modelPackage
The cached model package- Generated class or method.
-
-
Method Detail
-
isSwitchFor
protected boolean isSwitchFor(EPackage ePackage)
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
protected T doSwitch(int classifierID, EObject theEObject)
CallscaseXXX
for each class of the model until one returns a non null result; it yields that result.
-
caseType
public T caseType(Type object)
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:
doSwitch(EObject)
- Generated class or method.
-
caseTypedElement
public T caseTypedElement(TypedElement object)
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:
doSwitch(EObject)
- Generated class or method.
-
caseTypeReference
public T caseTypeReference(TypeReference object)
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:
doSwitch(EObject)
- Generated class or method.
-
caseClassifierReference
public T caseClassifierReference(ClassifierReference object)
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:
doSwitch(EObject)
- Generated class or method.
-
caseNamespaceClassifierReference
public T caseNamespaceClassifierReference(NamespaceClassifierReference object)
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:
doSwitch(EObject)
- Generated class or method.
-
casePrimitiveType
public T casePrimitiveType(PrimitiveType object)
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:
doSwitch(EObject)
- Generated class or method.
-
caseBoolean
public T caseBoolean(Boolean object)
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:
doSwitch(EObject)
- Generated class or method.
-
caseByte
public T caseByte(Byte object)
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:
doSwitch(EObject)
- Generated class or method.
-
caseChar
public T caseChar(Char object)
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:
doSwitch(EObject)
- Generated class or method.
-
caseDouble
public T caseDouble(Double object)
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:
doSwitch(EObject)
- Generated class or method.
-
caseFloat
public T caseFloat(Float object)
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:
doSwitch(EObject)
- Generated class or method.
-
caseInt
public T caseInt(Int object)
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:
doSwitch(EObject)
- Generated class or method.
-
caseLong
public T caseLong(Long object)
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:
doSwitch(EObject)
- Generated class or method.
-
caseShort
public T caseShort(Short object)
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:
doSwitch(EObject)
- Generated class or method.
-
caseVoid
public T caseVoid(Void object)
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:
doSwitch(EObject)
- Generated class or method.
-
caseInferableType
public T caseInferableType(InferableType object)
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:
doSwitch(EObject)
- Generated class or method.
-
caseCommentable
public T caseCommentable(Commentable object)
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:
doSwitch(EObject)
- Generated class or method.
-
caseTypeArgumentable
public T caseTypeArgumentable(TypeArgumentable object)
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:
doSwitch(EObject)
- Generated class or method.
-
caseAnnotable
public T caseAnnotable(Annotable object)
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:
doSwitch(EObject)
- Generated class or method.
-
caseNamespaceAwareElement
public T caseNamespaceAwareElement(NamespaceAwareElement object)
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:
doSwitch(EObject)
- Generated class or method.
-
caseArrayTypeable
public T caseArrayTypeable(ArrayTypeable object)
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:
doSwitch(EObject)
- Generated class or method.
-
defaultCase
public T defaultCase(EObject object)
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:
Switch.doSwitch(org.eclipse.emf.ecore.EObject)
- Generated class or method.
-
-