Package net.sf.jmd.metarepresentation.impl

Examples of net.sf.jmd.metarepresentation.impl.Operation


    /* (non-Javadoc)
     * @see junit.framework.TestCase#setUp()
     */
    protected void setUp() throws Exception {
        super.setUp();
        operation = new Operation();
    }
View Full Code Here


       
        amInterface = new ModelItem();
        amInterface.setName("AnInterface");
        amInterface.setType("interface");
       
        IMember amMethod =  new Operation();
        amMethod.setName("myMethod");
        amInterface.addMember(amMethod);
       
        architectsModel = new Model();
        architectsModel.setType(Model.Type.AM);
        architectsModel.addModelItem(amInterface);
View Full Code Here

        //set up an interface
        dmInterface = new ModelItem();
        dmInterface.setName("AnInterface");
        dmInterface.setType("interface");
       
        IMember dmMethod =  new Operation();
        dmMethod.setName("myMethod");
        dmInterface.addMember(dmMethod);
       
        //set up a implementing class
        dmClass = new ModelItem();
        dmClass.setName("MyClass");
        dmClass.setType("class");
        dmClass.addExtendee(dmInterface);//MyClass implements AnInterface
       
        IMember dmClassMethod =  new Operation();
        dmClassMethod.setName("myMethod");
        dmClass.addMember(dmClassMethod);
       
        //!\ an Xtra public Method in the implementing class.
        IMember anExtraMethod =  new Operation();
        anExtraMethod.setModifiers(modifiers);
        anExtraMethod.setName("extraMethod");
        dmClass.addMember(anExtraMethod);
       
        //putting all together
        developersModel = new Model();
        developersModel.setType(Model.Type.DM);
View Full Code Here

       
        amModelItem = new ModelItem();
        amModelItem.setType("interface");
        amModelItem.setName("AnInterface");

        amMember = new Operation();
        amMember.addModifier("public");
        amMember.setType(voidTypeAM);
        amMember.setNamespace(amModelItem.getIdentifier());
        amMember.setName("aMember");

        amModelItem.addMember(amMember);

        // the DM with an interface and a member
        voidTypeDM = new ModelItem();
        voidTypeDM.setName("void");
       
        dmModelItem = new ModelItem();
        dmModelItem.setType("interface");
        dmModelItem.setName("AnInterface");

        dmMember = new Operation();
        dmMember.addModifier("public");
        dmMember.setType(voidTypeDM);
        dmMember.setNamespace(dmModelItem.getIdentifier());
        dmMember.setName("aMember");
       
View Full Code Here

     * Test method for {@link de.dlr.sistec.modi.checks.impl
     * .MembersModified#check(java.util.List)}.
     */
    public void testCheckOperationModified() {
      //An Operation adds the Parameter to a member
      amMember = new Operation();
      dmMember = new Operation();
     
      amModelItem.addMember(amMember);
      dmModelItem.addMember(dmMember);
      List<IDifference> results = membersModified.check(differences);
        assertNotNull("The results must not be null", results);
View Full Code Here

        IModelItem item = new ModelItem();
        item.setName("anItem");
        item.setNamespace("de.dlr.modi");
        item.setType("interface");
       
        Operation operation = new Operation();
        operation.setName("anOperation");
        operation.setNamespace(item.getIdentifier());
       
        Parameter parameter = new Parameter();
        parameter.setName("aParameter");
        parameter.setNamespace(operation.getIdentifier());
       
        operation.addParameter(parameter);
       
        Variable variable = new Variable();
        variable.setName("aVariable");
        variable.setNamespace(item.getIdentifier());
View Full Code Here

        assertTrue(model.equals(other));
        ModelItem newItem = new ModelItem();
        newItem.setName("anIdentifier");
        newItem.setType("interface");
       
        Operation operation = new Operation();
        operation.setName("voidFoo");
        operation.setNamespace(newItem.getIdentifier());
        newItem.addMember(operation);
       
        model.addModelItem(newItem);
        assertFalse(model.equals(other));
       
View Full Code Here

       
        ModelItem amItem = new ModelItem();
        amItem.setName("anotherInterface");
        amItem.setType("interface");
       
        Operation amOperation = new Operation();
        amOperation.setName("anotherMethod");
        amOperation.setNamespace(amItem.getIdentifier());
       
        Parameter amParameter = new Parameter();
        amParameter.setName("aParameter");
        amParameter.setNamespace(amOperation.getIdentifier());
       
        amOperation.addParameter(amParameter);
        amItem.addMember(amOperation);
        model.addModelItem(amItem);
       
        assertFalse(model.equals(other));
       
        ModelItem dmItem = new ModelItem();
        dmItem.setName("anotherInterface");
        dmItem.setType("interface");
       
        Operation dmOperation = new Operation();
        dmOperation.setName("anotherMethod");
        dmOperation.setNamespace(dmItem.getIdentifier());
       
        Parameter dmParameter = new Parameter();
        dmParameter.setName("aParameter");
        dmParameter.setNamespace(dmOperation.getIdentifier());
       
        dmOperation.addParameter(dmParameter);
        dmItem.addMember(dmOperation);
        other.addModelItem(dmItem);
       
        assertTrue(model.equals(other));
       
        //now the developer adds a parameter to the method:
        Parameter newParameter = new Parameter();
        newParameter.setName("newParameter");
        dmOperation.addParameter(newParameter);
       
        assertFalse(model.equals(other));
    }
View Full Code Here

        }
        modelItem.addMember(memberVariable);
    }

    private void doOperationLevelAction(AST node) {
        memberOperation = new Operation();
        for (AST tmp = node.getFirstChild(); tmp != null; tmp = tmp
                .getNextSibling()) {

            int type = tmp.getType();
            switch (type) {
View Full Code Here

        }
        modelItem.addMember(memberVariable);
    }

    private void doOperationLevelAction(AST node) {
        memberOperation = new Operation();
        for (AST tmp = node.getFirstChild(); tmp != null; tmp = tmp
                .getNextSibling()) {

            int type = tmp.getType();
            switch (type) {
View Full Code Here

TOP

Related Classes of net.sf.jmd.metarepresentation.impl.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.