|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Object | +--org.argouml.model.uml.foundation.core.CoreHelper
Helper class for UML Foundation::Core Package.
Current implementation is a placeholder.
| Field Summary | |
|---|---|
protected static Logger |
cat
Deprecated. by Linus Tolke as of 0.15.4. Use your own logger in your class. This will be removed. |
private static CoreHelper |
SINGLETON
Singleton instance. |
| Constructor Summary | |
|---|---|
private |
CoreHelper()
Don't allow instantiation. |
| Method Summary | |
|---|---|
MDependency |
buildSupportDependency(MModelElement from,
MModelElement to)
Builds a dependency with stereotype support. |
boolean |
equalsAggregationKind(java.lang.Object associationEnd,
java.lang.String kindType)
|
java.util.Collection |
getAllAttributes(MClassifier clazz)
Returns all attributes of some classifier and of its parents. |
java.util.Collection |
getAllBehavioralFeatures()
Returns all behavioralfeatures found in the projectbrowser model |
java.util.Collection |
getAllBehavioralFeatures(MModelElement element)
Returns all behavioralfeatures found in this element and its children. |
java.util.Collection |
getAllClasses()
Returns all classes found in the projectbrowser model. |
java.util.Collection |
getAllClasses(MNamespace ns)
Returns all classes found in this namespace and in its children. |
java.util.Collection |
getAllClassifiers()
Returns all classifiers found in the projectbrowser model |
java.util.Collection |
getAllClassifiers(MNamespace ns)
Returns all classifiers found in this namespace and in its children |
java.util.Collection |
getAllComponents()
Returns all components found in the projectbrowser model |
java.util.Collection |
getAllComponents(MNamespace ns)
Returns all components found in this namespace and in its children. |
java.util.Collection |
getAllContents(MClassifier clazz)
Returns the contents (owned elements) of this classifier and all its parents as specified in section 2.5.3.8 of the UML 1.3 spec. |
java.util.Collection |
getAllDataTypes()
Returns all datatypes found in the projectbrowser model. |
java.util.Collection |
getAllDataTypes(MNamespace ns)
Returns all components found in this namespace and in its children. |
java.util.Collection |
getAllInterfaces()
Returns all interfaces found in the projectbrowser model |
java.util.Collection |
getAllInterfaces(MNamespace ns)
Returns all interfaces found in this namespace and in its children |
java.util.Collection |
getAllNodes()
Returns all nodes found in the projectbrowser model |
java.util.Collection |
getAllNodes(MNamespace ns)
Returns all components found in this namespace and in its children. |
java.util.Collection |
getAllPossibleNamespaces(java.lang.Object modelElement)
Returns all possible namespaces that may be selected by some given modelelement. |
java.util.Collection |
getAllRealizedInterfaces(java.lang.Object o)
Returns all interfaces that are realized by the given class or by its superclasses. |
java.util.Collection |
getAllSupertypes(java.lang.Object cls1)
This method returns all Classifiers of which this class is a direct or indirect subtype. |
java.util.Collection |
getAssociatedClassifiers(java.lang.Object aclassifier)
Gets all classifiers that are associated to the given classifier (have an association relationship with the classifier). |
java.util.Collection |
getAssociateEnds(MClassifier classifier)
This method returns all opposite AssociationEnds of a given Classifier |
java.util.Collection |
getAssociateEndsInh(java.lang.Object classifier1)
This method returns all opposite AssociationEnds of a given Classifier, including inherited |
MAssociationEnd |
getAssociationEnd(MClassifier type,
MAssociation assoc)
Returns the associationend between a classifier and an associaton. |
java.util.Collection |
getAssociations(java.lang.Object oclassifier)
Returns all associations for some classifier. |
java.util.Collection |
getAssociations(java.lang.Object from,
java.lang.Object to)
Gets the associations between the classifiers from and to. |
java.util.Collection |
getAttributes(MClassifier classifier)
This method returns all attributes of a given Classifier. |
java.util.Collection |
getAttributesInh(java.lang.Object classifier)
This method returns all attributes of a given Classifier, including inherited |
java.util.Collection |
getBaseClasses(java.lang.Object o)
Returns the base classes (that are the classes that do not have any generalizations) for some given namespace. |
private void |
getChildren(java.util.Collection currentChildren,
MGeneralization gen)
Adds all children recursively to the Collection in the first argument. |
java.util.Collection |
getChildren(java.lang.Object o)
Returns all children from some given generalizableelement on all levels (the complete tree excluding the generalizable element itself). |
private MNamespace |
getCurrentModel()
Get the current model. |
java.util.Collection |
getDependencies(java.lang.Object supplierObj,
java.lang.Object clientObj)
Returns the dependencies between some supplier modelelement and some client modelelement. |
java.lang.Object |
getDestination(java.lang.Object relationship)
Returns the destination of a relation. |
java.util.Collection |
getExtendedClassifiers(java.lang.Object clazz)
Returns all classes some generalizable element extends. |
java.util.Collection |
getExtendingClassifiers(MClassifier clazz)
Returns all classifiers that extend some classifier. |
java.util.Collection |
getExtendingElements(java.lang.Object clazz)
Returns all elements that extend some class. |
java.lang.String |
getFeatureName(java.lang.Object o)
This method returns the name of a feature. |
MNamespace |
getFirstSharedNamespace(MNamespace ns1,
MNamespace ns2)
Gets the first namespace two namespaces share. |
java.util.Collection |
getFlows(MModelElement source,
MModelElement target)
Returns all flows from some source modelelement to a target modelelement. |
MGeneralization |
getGeneralization(java.lang.Object achild,
java.lang.Object aparent)
Gets the generalization between two generalizable elements. |
static CoreHelper |
getHelper()
Singleton instance access method. |
java.util.Collection |
getOperations(java.lang.Object classifier)
This method returns all operations of a given Classifier |
java.util.Collection |
getOperationsInh(MClassifier classifier)
This method returns all operations of a given Classifier, including inherited |
java.util.Collection |
getRealizedInterfaces(MClassifier classifier)
Return all interfaces the given class realizes. |
java.util.Collection |
getRelationships(MModelElement source,
MModelElement dest)
Returns all relationships between the source and dest modelelement and vica versa. |
MParameter |
getReturnParameter(java.lang.Object operation1)
This method finds all paramters of the given operation which have the MParamterDirectionType RETURN. |
java.util.Collection |
getReturnParameters(java.lang.Object operation)
Returns all return parameters for an operation. |
java.lang.Object |
getSource(java.lang.Object relationship)
Returns the source of a relation. |
MOperation |
getSpecification(java.lang.Object object)
Returns the operation that some method realized. |
java.util.Collection |
getSpecifications(java.lang.Object classifier)
Returns all Interfaces of which this class is a realization. |
java.util.Collection |
getSubtypes(MClassifier cls)
This method returns all Classifiers of which this class is a direct supertype. |
java.util.Collection |
getSupertypes(java.lang.Object ogeneralizableelement)
This method returns all Classifiers of which this class is a direct subtype. |
boolean |
hasCompositeEnd(java.lang.Object association)
|
private java.util.Collection |
internalGetAllRealizedInterfaces(java.lang.Object o,
java.util.Collection col,
java.util.Set visited)
Helper method for getAllRealizedInterfaces. |
boolean |
isMethod(java.lang.Object o)
This method returns if the object is a method. |
boolean |
isOperation(java.lang.Object o)
This method returns if the object is an operation. |
boolean |
isValidNamespace(java.lang.Object mObj,
java.lang.Object nsObj)
Returns true if some modelelement may be owned by the given namespace. |
void |
removeFeature(java.lang.Object cls,
java.lang.Object feature)
This method removes a feature from a classifier. |
void |
setReturnParameter(java.lang.Object operation,
java.lang.Object newReturnParameter)
Build a returnparameter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static Logger cat
private static CoreHelper SINGLETON
| Constructor Detail |
private CoreHelper()
| Method Detail |
public static CoreHelper getHelper()
public java.util.Collection getAllSupertypes(java.lang.Object cls1)
cls1 - the class you want to have the parents for
MGeneralizableElementpublic java.util.Collection getSupertypes(java.lang.Object ogeneralizableelement)
ogeneralizableelement - the class you want to have the parents for
MGeneralizableElementpublic java.util.Collection getAssociateEnds(MClassifier classifier)
classifier - the classifier you want to have the opposite
association ends for
public java.util.Collection getAssociateEndsInh(java.lang.Object classifier1)
classifier1 - the classifier you want to have the opposite
association ends for
public void removeFeature(java.lang.Object cls,
java.lang.Object feature)
cls - feature - public java.lang.String getFeatureName(java.lang.Object o)
o - is the feature
public boolean isMethod(java.lang.Object o)
o - object
public boolean isOperation(java.lang.Object o)
o - object
public java.util.Collection getOperations(java.lang.Object classifier)
classifier - the classifier you want to have the operations for
public java.util.Collection getAttributes(MClassifier classifier)
classifier - the classifier you want to have the attributes for
public java.util.Collection getAttributesInh(java.lang.Object classifier)
classifier - the classifier you want to have the attributes for
public java.util.Collection getOperationsInh(MClassifier classifier)
classifier - the classifier you want to have the operations for
public MParameter getReturnParameter(java.lang.Object operation1)
operation1 - the operation you want to find the return
parameter for.
public java.util.Collection getReturnParameters(java.lang.Object operation)
operation - is the operation.
public MOperation getSpecification(java.lang.Object object)
object - the method you want the realized operation of.
public java.util.Collection getSpecifications(java.lang.Object classifier)
classifier - the class you want to have the interfaces for
public java.util.Collection getSubtypes(MClassifier cls)
cls - the class you want to have the children for
MGeneralizableElement
public void setReturnParameter(java.lang.Object operation,
java.lang.Object newReturnParameter)
operation - is the operationnewReturnParameter - is the return parameter.
public MDependency buildSupportDependency(MModelElement from,
MModelElement to)
from - is the model element where the dependency beginsto - is the model element where dependency ends
public java.util.Collection getAllBehavioralFeatures(MModelElement element)
element - is the element
public java.util.Collection getAllBehavioralFeatures()
public java.util.Collection getAllInterfaces()
public java.util.Collection getAllInterfaces(MNamespace ns)
public java.util.Collection getAllClasses()
public java.util.Collection getAllClasses(MNamespace ns)
ns - is the namespace.
public java.util.Collection getRealizedInterfaces(MClassifier classifier)
classifier - is the class
public java.util.Collection getExtendedClassifiers(java.lang.Object clazz)
clazz - is the generalizable element
public MGeneralization getGeneralization(java.lang.Object achild,
java.lang.Object aparent)
achild - is the child generalizable element.aparent - is the parent generalizable element.
public java.util.Collection getFlows(MModelElement source,
MModelElement target)
source - is the source model element.target - is the target model element.
public java.util.Collection getExtendingElements(java.lang.Object clazz)
clazz - is the class (a generalizable element)
public java.util.Collection getExtendingClassifiers(MClassifier clazz)
clazz - is the classifier.
public java.util.Collection getAllComponents()
public java.util.Collection getAllComponents(MNamespace ns)
ns - is the namespace.
public java.util.Collection getAllDataTypes()
public java.util.Collection getAllDataTypes(MNamespace ns)
ns - is the namespace
public java.util.Collection getAllNodes()
public java.util.Collection getAllNodes(MNamespace ns)
ns - is the namespace
public java.util.Collection getAssociatedClassifiers(java.lang.Object aclassifier)
aclassifier - an MClassifier
public java.util.Collection getAssociations(java.lang.Object from,
java.lang.Object to)
from - a classifierto - a classifier
public java.util.Collection getAllClassifiers()
public java.util.Collection getAllClassifiers(MNamespace ns)
public java.util.Collection getAssociations(java.lang.Object oclassifier)
oclassifier -
public MAssociationEnd getAssociationEnd(MClassifier type,
MAssociation assoc)
type - is the classifierassoc - is the association
public java.util.Collection getAllContents(MClassifier clazz)
clazz - is the classifier
public java.util.Collection getAllAttributes(MClassifier clazz)
clazz - is the classifier
public java.lang.Object getSource(java.lang.Object relationship)
This method also works to get the source of a Link.
relationship - is the relation
public java.lang.Object getDestination(java.lang.Object relationship)
This method also works for links.
relationship - is the relation
public java.util.Collection getDependencies(java.lang.Object supplierObj,
java.lang.Object clientObj)
supplierObj - a MModelElementclientObj - a MModelElement
public java.util.Collection getRelationships(MModelElement source,
MModelElement dest)
source - is the source model elementdest - is the destination model element
public boolean isValidNamespace(java.lang.Object mObj,
java.lang.Object nsObj)
mObj - a MModelElementnsObj - a MNamespace
public MNamespace getFirstSharedNamespace(MNamespace ns1,
MNamespace ns2)
ns1 - is the first name spacens2 - is the second name space
public java.util.Collection getAllPossibleNamespaces(java.lang.Object modelElement)
modelElement - is the model element
public java.util.Collection getBaseClasses(java.lang.Object o)
o - is the given namespace.
public java.util.Collection getChildren(java.lang.Object o)
o - is the generalizable element
java.lang.IllegalStateException - if there is a circular reference.
private void getChildren(java.util.Collection currentChildren,
MGeneralization gen)
throws java.lang.IllegalStateException
currentChildren - collection to collect them in.gen - element whose children are added.
java.lang.IllegalStateException - if there is a circular reference.public java.util.Collection getAllRealizedInterfaces(java.lang.Object o)
o - is the given class
private java.util.Collection internalGetAllRealizedInterfaces(java.lang.Object o,
java.util.Collection col,
java.util.Set visited)
o - col - visited -
public final boolean hasCompositeEnd(java.lang.Object association)
public final boolean equalsAggregationKind(java.lang.Object associationEnd,
java.lang.String kindType)
associationEnd - is the association endkindType - the MAggregationKind as a string in lower case letter,
eg: composite.
private MNamespace getCurrentModel()
|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
| ArgoUML © 1996-2004 (20040306) | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |