Class PlatformSwitch<T>
- java.lang.Object
-
- org.eclipse.emf.ecore.util.Switch<T>
-
- com._1c.g5.v8.dt.platform.model.util.PlatformSwitch<T>
-
public class PlatformSwitch<T> extends org.eclipse.emf.ecore.util.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:
PlatformPackage
-
-
Field Summary
Fields Modifier and Type Field Description protected static PlatformPackage
modelPackage
The cached model package
-
Constructor Summary
Constructors Constructor Description PlatformSwitch()
Creates an instance of the switch.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
caseBorder(Border object)
Returns the result of interpreting the object as an instance of 'Border'.T
caseBorderDef(BorderDef object)
Returns the result of interpreting the object as an instance of 'Border Def'.T
caseColor(Color object)
Returns the result of interpreting the object as an instance of 'Color'.T
caseColorDef(ColorDef object)
Returns the result of interpreting the object as an instance of 'Color Def'.T
caseDuallyNamedElement(DuallyNamedElement object)
Returns the result of interpreting the object as an instance of 'Dually Named Element'.T
caseFont(Font object)
Returns the result of interpreting the object as an instance of 'Font'.T
caseFontDef(FontDef object)
Returns the result of interpreting the object as an instance of 'Font Def'.T
caseFontRef(FontRef object)
Returns the result of interpreting the object as an instance of 'Font Ref'.T
caseMutableFont(MutableFont object)
Returns the result of interpreting the object as an instance of 'Mutable Font'.T
caseNamedElement(NamedElement object)
Returns the result of interpreting the object as an instance of 'Named Element'.T
casePicture(Picture object)
Returns the result of interpreting the object as an instance of 'Picture'.T
casePictureDef(PictureDef object)
Returns the result of interpreting the object as an instance of 'Picture Def'.T
casePlatformBorder(PlatformBorder object)
Returns the result of interpreting the object as an instance of 'Border'.T
casePlatformColor(PlatformColor object)
Returns the result of interpreting the object as an instance of 'Color'.T
casePlatformFont(PlatformFont object)
Returns the result of interpreting the object as an instance of 'Font'.T
casePlatformFontRef(PlatformFontRef object)
Returns the result of interpreting the object as an instance of 'Font Ref'.T
casePlatformPicture(PlatformPicture object)
Returns the result of interpreting the object as an instance of 'Picture'.T
caseSystemColor(SystemColor object)
Returns the result of interpreting the object as an instance of 'System Color'.T
caseSystemFont(SystemFont object)
Returns the result of interpreting the object as an instance of 'System Font'.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.
-
-
-
Field Detail
-
modelPackage
protected static PlatformPackage modelPackage
The cached model package
-
-
Method Detail
-
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
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.- Overrides:
doSwitch
in classorg.eclipse.emf.ecore.util.Switch<T>
- Returns:
- the first non-null result returned by a
caseXXX
call.
-
casePlatformBorder
public T casePlatformBorder(PlatformBorder object)
Returns the result of interpreting the object as an instance of 'Border'. 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 'Border'.
- See Also:
doSwitch(EObject)
-
casePlatformFont
public T casePlatformFont(PlatformFont object)
Returns the result of interpreting the object as an instance of 'Font'. 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 'Font'.
- See Also:
doSwitch(EObject)
-
casePlatformFontRef
public T casePlatformFontRef(PlatformFontRef object)
Returns the result of interpreting the object as an instance of 'Font Ref'. 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 'Font Ref'.
- See Also:
doSwitch(EObject)
-
caseSystemFont
public T caseSystemFont(SystemFont object)
Returns the result of interpreting the object as an instance of 'System Font'. 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 'System Font'.
- See Also:
doSwitch(EObject)
-
casePlatformColor
public T casePlatformColor(PlatformColor object)
Returns the result of interpreting the object as an instance of 'Color'. 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 'Color'.
- See Also:
doSwitch(EObject)
-
caseSystemColor
public T caseSystemColor(SystemColor object)
Returns the result of interpreting the object as an instance of 'System Color'. 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 'System Color'.
- See Also:
doSwitch(EObject)
-
casePlatformPicture
public T casePlatformPicture(PlatformPicture object)
Returns the result of interpreting the object as an instance of 'Picture'. 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 'Picture'.
- See Also:
doSwitch(EObject)
-
caseNamedElement
public T caseNamedElement(NamedElement object)
Returns the result of interpreting the object as an instance of 'Named 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 'Named Element'.
- See Also:
doSwitch(EObject)
-
caseBorder
public T caseBorder(Border object)
Returns the result of interpreting the object as an instance of 'Border'. 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 'Border'.
- See Also:
doSwitch(EObject)
-
caseBorderDef
public T caseBorderDef(BorderDef object)
Returns the result of interpreting the object as an instance of 'Border Def'. 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 'Border Def'.
- See Also:
doSwitch(EObject)
-
caseFont
public T caseFont(Font object)
Returns the result of interpreting the object as an instance of 'Font'. 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 'Font'.
- See Also:
doSwitch(EObject)
-
caseMutableFont
public T caseMutableFont(MutableFont object)
Returns the result of interpreting the object as an instance of 'Mutable Font'. 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 'Mutable Font'.
- See Also:
doSwitch(EObject)
-
caseFontDef
public T caseFontDef(FontDef object)
Returns the result of interpreting the object as an instance of 'Font Def'. 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 'Font Def'.
- See Also:
doSwitch(EObject)
-
caseFontRef
public T caseFontRef(FontRef object)
Returns the result of interpreting the object as an instance of 'Font Ref'. 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 'Font Ref'.
- See Also:
doSwitch(EObject)
-
caseColor
public T caseColor(Color object)
Returns the result of interpreting the object as an instance of 'Color'. 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 'Color'.
- See Also:
doSwitch(EObject)
-
caseColorDef
public T caseColorDef(ColorDef object)
Returns the result of interpreting the object as an instance of 'Color Def'. 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 'Color Def'.
- See Also:
doSwitch(EObject)
-
caseDuallyNamedElement
public T caseDuallyNamedElement(DuallyNamedElement object)
Returns the result of interpreting the object as an instance of 'Dually Named 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 'Dually Named Element'.
- See Also:
doSwitch(EObject)
-
casePicture
public T casePicture(Picture object)
Returns the result of interpreting the object as an instance of 'Picture'. 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 'Picture'.
- See Also:
doSwitch(EObject)
-
casePictureDef
public T casePictureDef(PictureDef object)
Returns the result of interpreting the object as an instance of 'Picture Def'. 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 'Picture Def'.
- See Also:
doSwitch(EObject)
-
defaultCase
public T defaultCase(org.eclipse.emf.ecore.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 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)
-
-