001package org.andromda.cartridges.meta.metafacades;
002
003import org.andromda.metafacades.uml.OperationFacade;
004import org.andromda.metafacades.uml.ParameterFacade;
005
006/**
007 * @author <a href="http://www.mbohlen.de">Matthias Bohlen </a>
008 * @since 25.02.2004
009 */
010public class UMLOperationData
011    extends MethodData
012{
013    /**
014     * Constructs a MethodData object from an OperationFacade.
015     *
016     * @param metafacadeName the name of the parent class
017     * @param operation the operation facade
018     */
019    public UMLOperationData(
020        final String metafacadeName,
021        final OperationFacade operation)
022    {
023        super(
024            metafacadeName,
025            operation.getVisibility(),
026            operation.isAbstract(),
027            operation.getGetterSetterReturnTypeName(),
028            operation.getName(),
029            operation.getDocumentation("     * "));
030
031        for (ParameterFacade parameter : operation.getArguments())
032        {
033            addArgument(
034                new ArgumentData(
035                    parameter.getGetterSetterTypeName(),
036                    parameter.getName()));
037        }
038    }
039}