org.andromda.metafacades.emf.uml22.StateFacadeLogicImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of andromda-metafacades-emf-uml22 Show documentation
Show all versions of andromda-metafacades-emf-uml22 Show documentation
The Eclipse EMF UML2 v2.X metafacades. This is the set of EMF UML2 2.X metafacades
implementations. These implement the common UML metafacades for .uml model files.
The newest version!
package org.andromda.metafacades.emf.uml22;
import java.util.ArrayList;
import java.util.Collection;
import org.eclipse.uml2.uml.Behavior;
import org.eclipse.uml2.uml.State;
/**
* MetafacadeLogic implementation for org.andromda.metafacades.uml.StateFacade.
*
* @see org.andromda.metafacades.uml.StateFacade
*/
public class StateFacadeLogicImpl
extends StateFacadeLogic
{
private static final long serialVersionUID = 34L;
/**
* @param metaObject
* @param context
*/
public StateFacadeLogicImpl(
final State metaObject,
final String context)
{
super(metaObject, context);
}
/**
* @see org.andromda.metafacades.uml.StateFacade#getDeferrableEvents()
*/
@Override
protected Collection handleGetDeferrableEvents()
{
// UML1.4 Events are mapped to UML2 Activity
// We obtain them through entry, doActivity and exit
final Collection events = new ArrayList();
final Behavior entry = this.metaObject.getEntry();
final Behavior doActivity = this.metaObject.getDoActivity();
final Behavior onExit = this.metaObject.getExit();
if (entry != null)
{
events.add(entry);
}
if (doActivity != null)
{
events.add(doActivity);
}
if (onExit != null)
{
events.add(onExit);
}
return events;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy