|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.andromda.metafacades.uml.MetafacadeUtils
public class MetafacadeUtils
A class containing utlities for metafacade manipulation.
| Constructor Summary | |
|---|---|
MetafacadeUtils()
|
|
| Method Summary | |
|---|---|
static void |
filterByNotType(java.util.Collection modelElements,
java.lang.Class type)
Filters out the model elements from the modelElements collection that are of (or inherit from) the
specified type type |
static void |
filterByStereotype(java.util.Collection modelElements,
java.lang.String stereotype)
Filters out the model elements from the modelElements collection that don't have the specified
stereotype |
static void |
filterByType(java.util.Collection modelElements,
java.lang.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 java.lang.Object |
getElementAsType(java.lang.Object element,
java.lang.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 java.lang.String |
getSignature(java.lang.String name,
java.util.Collection arguments,
boolean withArgumentNames,
java.lang.String argumentModifier)
Creates a typed argument list with the given arguments. |
static java.lang.String |
getTypedArgumentList(java.util.Collection arguments,
boolean withArgumentNames,
java.lang.String modifier)
Creates a typed argument list with the given arguments. |
static void |
sortByFullyQualifiedName(java.util.List metafacades)
Sorts given metafacades by their fully qualified name. |
static java.lang.String |
toRelationName(java.lang.String roleName,
java.lang.String targetRoleName,
java.lang.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 java.lang.Object getElementAsType(java.lang.Object element,
java.lang.Class type)
element - the element to check.type - the Class type.
public static void filterByStereotype(java.util.Collection modelElements,
java.lang.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(java.util.Collection modelElements,
java.lang.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(java.util.Collection modelElements,
java.lang.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 java.lang.String toRelationName(java.lang.String roleName,
java.lang.String targetRoleName,
java.lang.String separator)
roleName - name of role in relationtargetRoleName - name of target role in relationseparator - character used to separate words
public static void sortByFullyQualifiedName(java.util.List metafacades)
metafacades - the collection of model elements to sort.
public static java.lang.String getTypedArgumentList(java.util.Collection arguments,
boolean withArgumentNames,
java.lang.String modifier)
arguments. If the withArgumentNames
flag is true, the argument names are included in the list.
arguments - the arguments from which to create the list.withArgumentNames - whether or not to include the argument names.modifier -
public static java.lang.String getSignature(java.lang.String name,
java.util.Collection arguments,
boolean withArgumentNames,
java.lang.String argumentModifier)
arguments. If the withArgumentNames
flag is true, the argument names are included in the list.
arguments - the arguments from which to create the list.withArgumentNames - whether or not to include the argument names.modifier -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||