org.andromda.metafacades.uml14.ActorFacadeLogicImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of andromda-metafacades-uml14 Show documentation
Show all versions of andromda-metafacades-uml14 Show documentation
The UML 1.4 metafacades. This is the set of UML 1.4 metafacades
implementations. These implement the common UML metafacades.
The newest version!
package org.andromda.metafacades.uml14;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import org.andromda.metafacades.uml.ActorFacade;
import org.andromda.metafacades.uml.GeneralizableElementFacade;
import org.omg.uml.behavioralelements.usecases.Actor;
/**
* Metaclass facade implementation.
* @author Bob Fields
*/
public class ActorFacadeLogicImpl
extends ActorFacadeLogic
{
private static final long serialVersionUID = 34L;
/**
* @param metaObject
* @param context
*/
public ActorFacadeLogicImpl(
Actor metaObject,
String context)
{
super(metaObject, context);
}
/**
* @see org.andromda.core.metafacade.MetafacadeBase#getValidationOwner()
*/
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 Iterator iterator = parentActors.iterator(); iterator.hasNext();)
{
final Object object = iterator.next();
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 Iterator iterator = specializedActors.iterator(); iterator.hasNext();)
{
final Object object = iterator.next();
if (object instanceof ActorFacade)
{
generalizedByActors.add((ActorFacade) object);
}
}
return generalizedByActors;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy