Package org.eclipse.uml2

Examples of org.eclipse.uml2.Operation


        for (final Iterator iterator = nodes.iterator(); iterator.hasNext();)
        {
            final Object nextNode = iterator.next();
            if (nextNode instanceof CallOperationAction)
            {
                final Operation operation = ((CallOperationAction)nextNode).getOperation();
                if (operation != null)
                {
                    operations.add(operation);
                }
            }
View Full Code Here


        Object modelElement = null;
        for (final Iterator iterator = resourceSet.getResources().iterator();
            iterator.hasNext() && modelElement == null;)
        {
            final Resource resource = (Resource)iterator.next();
            final Package model =
                (Package)EcoreUtil.getObjectByType(
                    resource.getContents(),
                    UML2Package.eINSTANCE.getPackage());
            if (model != null)
            {
                for (final TreeIterator elementIterator = model.eAllContents();
                    elementIterator.hasNext() && modelElement == null;)
                {
                    final Object object = elementIterator.next();
                    if (pred.evaluate(object))
                    {
View Full Code Here

            // test number of parameters
            if (firstParameters.size() == secondParameters.size())
            {
                for (int i = 0; i < firstParameters.size() && sameSignature; i++)
                {
                    final Parameter firstParameter = (Parameter)firstParameters.get(i);
                    final Parameter secondParameter = (Parameter)secondParameters.get(i);

                    // test each parameter's type
                    sameSignature =
                        isEqual(
                            firstParameter.getType(),
                            secondParameter.getType());
                }
            }
            else
            {
                sameSignature = false;
View Full Code Here

        Iterator iterator = this.metaObject.getOwnedParameters().iterator();

        boolean commaNeeded = false;
        while (iterator.hasNext())
        {
            Parameter parameter = (Parameter)iterator.next();

            if (!parameter.getDirection().equals(ParameterDirectionKind.RETURN_LITERAL))
            {
                if (commaNeeded)
                {
                    buffer.append(", ");
                }
                buffer.append(parameter.getName());
                commaNeeded = true;
            }
        }
        return buffer.toString();
    }
View Full Code Here

        Iterator iterator = this.metaObject.getOwnedParameters().iterator();

        boolean commaNeeded = false;
        while (iterator.hasNext())
        {
            Parameter parameter = (Parameter)iterator.next();

            if (!parameter.getDirection().equals(ParameterDirectionKind.RETURN_LITERAL))
            {
                if (commaNeeded)
                {
                    buffer.append(", ");
                }
View Full Code Here

            arguments,
            new Predicate()
            {
                public boolean evaluate(final Object object)
                {
                    Parameter p = (Parameter)object;
                    return !p.getDirection().equals(ParameterDirectionKind.RETURN_LITERAL) && !p.isException();
                }
            });
        return arguments;
    }
View Full Code Here

                    MetafacadeConstants.NAMESPACE_SCOPE_OPERATOR,
                    true);
            if (modelElement instanceof Type)
            {
                Type element = (Type)modelElement;
                final Property property = umlClass.createOwnedAttribute(
                        name,
                        element,
                        1,
                        1);
                VisibilityKind kind = VisibilityKind.PUBLIC_LITERAL;
                if (visibility.equalsIgnoreCase("package"))
                {
                    kind = VisibilityKind.PACKAGE_LITERAL;
                }
                if (visibility.equalsIgnoreCase("private"))
                {
                    kind = VisibilityKind.PRIVATE_LITERAL;
                }
                if (visibility.equalsIgnoreCase("protected"))
                {
                    kind = VisibilityKind.PROTECTED_LITERAL;
                }
                property.setVisibility(kind);
                Stereotype stereotype =
                    UmlUtilities.findApplicableStereotype(
                        property,
                        UMLProfile.STEREOTYPE_IDENTIFIER);
                if (stereotype == null)
                {
                    throw new MetafacadeException("Could not apply '" + UMLProfile.STEREOTYPE_IDENTIFIER + "' to " +
                        property + ", the stereotype could not be found");
                }
                property.apply(stereotype);
            }
        }
    }
View Full Code Here

    public boolean equals(final Object obj)
    {
        if (obj instanceof Attribute)
        {
            Property other = ((AttributeImpl)obj).property;
            return this.property.equals(other);
        }
        if (obj instanceof AssociationEnd)
        {
            Property other = ((AssociationEndImpl)obj).property;
            return this.property.equals(other);
        }
        return this.property.equals(obj);
    }
View Full Code Here

        for (final Iterator memberIterator = members.iterator(); memberIterator.hasNext();)
        {
            final Object nextCandidate = memberIterator.next();
            if (nextCandidate instanceof Property)
            {
                final Property property = (Property)nextCandidate;

                if (property.getAssociation() == null)
                {
                    if (logger.isDebugEnabled())
                    {
                        logger.debug("Attribute found for " + classifier.getName() + ": " + property.getName());
                        if (attributeMap.containsKey(property.getName()))
                        {
                            logger.warn(
                                "An attribute with this name has already been registered, overriding: " +
                                property.getName());
                        }
                    }

                    // property represents an association end
                    attributeMap.put(
                        property.getName(),
                        property);
                }
            }
        }
View Full Code Here

                Property.class,
                classifier.getModel());

        for (final Iterator propertyIterator = allProperties.iterator(); propertyIterator.hasNext();)
        {
            final Property property = (Property)propertyIterator.next();

            // only treat association ends, ignore attributes
            if (property.getAssociation() != null && isAssociationEndAttachedToType(
                    classifier,
                    property,
                    follow))
            {
                associationEnds.add(property);
View Full Code Here

TOP

Related Classes of org.eclipse.uml2.Operation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.