org.andromda.metafacades.emf.uml22.ActorFacadeLogicImpl 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 java.util.List;
import org.andromda.metafacades.uml.ActorFacade;
import org.andromda.metafacades.uml.GeneralizableElementFacade;
import org.eclipse.uml2.uml.Actor;
/**
* MetafacadeLogic implementation for org.andromda.metafacades.uml.ActorFacade.
*
* @see org.andromda.metafacades.uml.ActorFacade
*/
public class ActorFacadeLogicImpl
extends ActorFacadeLogic
{
private static final long serialVersionUID = 34L;
/**
* @param metaObject
* @param context
*/
public ActorFacadeLogicImpl(
final Actor metaObject,
final String context)
{
super(metaObject, context);
}
/**
* @see org.andromda.core.metafacade.MetafacadeBase#getValidationOwner()
*/
@Override
public Object getValidationOwner()
{
return this.getPackage();
}
/**
* @see org.andromda.metafacades.uml.ActorFacade#getGeneralizedActors()
*/
@Override
protected List handleGetGeneralizedActors()
{
final List generalizedActors = new ArrayList();
final Collection parentActors = this.getGeneralizations();
for (final GeneralizableElementFacade object : parentActors)
{
if (object instanceof ActorFacade)
{
generalizedActors.add((ActorFacade) object);
}
}
return generalizedActors;
}
/**
*
* @see org.andromda.metafacades.uml.ActorFacade#getGeneralizedByActors()
*/
@Override
protected List handleGetGeneralizedByActors()
{
final List generalizedByActors = new ArrayList();
final Collection specializedActors = this.getSpecializations();
for (final GeneralizableElementFacade object : specializedActors)
{
if (object instanceof ActorFacade) {
generalizedByActors.add((ActorFacade) object);
}
}
return generalizedByActors;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy