|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.andromda.metafacades.uml.MetafacadeUtils
A class containing utlities for metafacade manipulation.
| Constructor Summary | |
MetafacadeUtils()
|
|
| Method Summary | |
static void |
filterByNotType(Collection modelElements,
Class type)
Filters out the model elements from the modelElements collection that are of (or inherit from) the
specified type type |
static void |
filterByStereotype(Collection modelElements,
String stereotype)
Filters out the model elements from the modelElements collection that don't have the specified
stereotype |
static void |
filterByType(Collection modelElements,
Class type)
Filters out the model elements from the modelElements collection that are not of (or do not inherit
from) the specified type type |
static Object |
getElementAsType(Object element,
Class type)
Checks to see if the element is the specified type and if so casts it to the object and returns it, otherwise it returns null. |
static void |
sortByFullyQualifiedName(List metafacades)
Sorts given metafacades by their fully qualified name. |
static String |
toRelationName(String roleName,
String targetRoleName,
String separator)
Returns a consistent name for a relation, independent from the end of the relation one is looking at. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public MetafacadeUtils()
| Method Detail |
public static Object getElementAsType(Object element,
Class type)
element - the element to check.type - the Class type.
public static void filterByStereotype(Collection modelElements,
String stereotype)
modelElements collection that don't have the specified
stereotype
modelElements - the model elements to filter.stereotype - the stereotype that a model element must have in order to stay remain within the
modelElements collection.
public static void filterByType(Collection modelElements,
Class type)
modelElements collection that are not of (or do not inherit
from) the specified type type
modelElements - the model elements to filter.type - the type of Class.
public static void filterByNotType(Collection modelElements,
Class type)
modelElements collection that are of (or inherit from) the
specified type type
modelElements - the model elements to filter.type - the type of Class.
public static String toRelationName(String roleName,
String targetRoleName,
String separator)
roleName - name of role in relationtargetRoleName - name of target role in relationseparator - character used to separate words
public static void sortByFullyQualifiedName(List metafacades)
metafacades - the collection of model elements to sort.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||