Package net.sf.jmd.evaluation

Examples of net.sf.jmd.evaluation.IDifference


                }
            }
            //now we have all modified members found
           
            for (IModelElement member : modifiedMembers.keySet()) {
                IDifference difference = new Difference();
                difference.setName(super.getName());
                difference.setSeverity(super.getSeverity());
                difference.setDescription("The member \""
                        + member.getIdentifier()
                        + "\" in the interface \""
                        + modifiedInterfaces.get(amElement).getIdentifier()
                        + "\" has been modified.");
                difference.setLayer(IDifference.Layer.MEMBER);
                difference.setStatus(IDifference.Status.MODIFIED);
                difference.setAMElement(member);
                difference.setDMElement(modifiedMembers.get(member));
                difference.setParentElement(modifiedInterfaces.get(amElement));
                results.add(difference);
            }

        }
View Full Code Here


            } else {
                /*
                 * cases: REMOVED, ADDED: impossible
                 * MODIFIED: an interface has become a class or vice versa
                 */
                IDifference typeDifference = new Difference();
           
                typeDifference.setDescription("The type of the item "
                        + am.getIdentifier()
                        + " has been modified to "
                        + dmType);
                typeDifference.setAMElement((IModelElement)am);
                typeDifference.setDMElement((IModelElement)dm);
                typeDifference.setLayer(IDifference.Layer.MODELITEM);
                typeDifference.setStatus(IDifference.Status.MODIFIED);
                typeDifference.setName("AllDifferencesFromOutside");
                results.add(typeDifference);
            }

        results.addAll(getDifferencesFromExtendees(amExtendees, dmExtendees));
        results.addAll(getDifferencesFromMembers(amMembers, dmMembers));
View Full Code Here

       
        assertNotNull("The check method must not return null", differences);

        assertTrue("There must be one Difference", differences.size() == 1);
       
        IDifference difference = differences.get(0);
        assertTrue("The DMElement of the difference must be the one with the"
                + " added public method in it.",
                difference.getDMElement().equals(dmClass));
    }
View Full Code Here

       
        assertNotNull("The check method must not return null", differences);
       
        assertEquals("There must be one Difference", 1, differences.size());
       
        IDifference difference = differences.get(0);
        String expected = "AClass";
        String actual =  difference.getDMElement().getIdentifier();
        assertEquals("The DMElement of the difference must be the one with the"
                + " added public method in it.", expected, actual);
    }
View Full Code Here

        dmMember.setNamespace(dmModelItem.getIdentifier());
        dmMember.setName("aMember");
       
        dmModelItem.addMember(dmMember);

        IDifference difference = new Difference();
        difference.setLayer(IDifference.Layer.MODELITEM);
        difference.setStatus(IDifference.Status.MODIFIED);
        difference.setAMElement((IModelElement) amModelItem);
        difference.setDMElement((IModelElement) dmModelItem);
        difference.setName("InterfacesModified");

        differences = new ArrayList<IDifference>();
        differences.add(difference);

        membersModified = new MembersModified();
View Full Code Here

            }

            // now we have the added members for this interface

            for (IParameter parameter : addedParameters) {
                IDifference difference = new Difference();
                difference.setName(super.getName());
                difference.setSeverity(super.getSeverity());
                difference.setDescription("The parameter \""
                        + parameter.getIdentifier()
                        + "\" has been added to the method \""
                        + amElement.getIdentifier() + "\".");
                difference.setLayer(IDifference.Layer.PARAMETER);
                difference.setStatus(IDifference.Status.ADDED);
                difference.setParentElement(amElement);
                difference.setDMElement((IModelElement) parameter);
                results.add(difference);
            }

        }
        return results;
View Full Code Here

                }
            }
        }
       
        for (IModelElement item : removedModelItems) {
            IDifference difference = new Difference();
            difference.setName(super.getName());
            difference.setSeverity(super.getSeverity());
            difference.setDescription("The " + ((IModelItem) item).getType()
                    + " \"" + item.getIdentifier()
                    + "\" has been removed from the model.");
            difference.setLayer(IDifference.Layer.MODELITEM);
            difference.setStatus(IDifference.Status.REMOVED);
            difference.setAMElement(item);
            results.add(difference);
        }
       
        return results;
    }
View Full Code Here

            }

            // now we have the added members for this interface

            for (IMember member : addedMembers) {
                IDifference difference = new Difference();
                difference.setName(super.getName());
                difference.setSeverity(super.getSeverity());
                difference.setDescription("The member \""
                        + member.getIdentifier()
                        + "\" has been added to \""
                        + modifiedInterfaces.get(amElement).getIdentifier()
                        + "\".");
                difference.setLayer(IDifference.Layer.MEMBER);
                difference.setStatus(IDifference.Status.ADDED);
                difference.setParentElement(modifiedInterfaces.get(amElement));
                difference.setDMElement((IModelElement) member);
                results.add(difference);
            }

        }
        return results;
View Full Code Here

                }
            }
            //now we have all modified members found
           
            for (IModelElement member : modifiedMembers.keySet()) {
                IDifference difference = new Difference();
                difference.setName(super.getName());
                difference.setSeverity(super.getSeverity());
                difference.setDescription("The member \""
                        + member.getIdentifier()
                        + "\" in the interface \""
                        + modifiedInterfaces.get(amElement).getIdentifier()
                        + "\" has been modified.");
                difference.setLayer(IDifference.Layer.MEMBER);
                difference.setStatus(IDifference.Status.MODIFIED);
                difference.setAMElement(member);
                difference.setDMElement(modifiedMembers.get(member));
                difference.setParentElement(modifiedInterfaces.get(amElement));
                results.add(difference);
            }

        }
View Full Code Here

            List<IDifference> results) {
        for (IModelItem item : items){
            List<String> imports = item.getImports();
            for (String importStatement : imports) {
                if(importStatement.endsWith(".*")){
                    IDifference diff = new Difference();
                    diff.setAMElement((IModelElement)item);
                    diff.setDescription("The item " + item.getIdentifier()
                            + " uses a *-import.");
                    diff.setLayer(IDifference.Layer.MODELITEM);
                    diff.setName(super.getName());
                    diff.setParentElement((IModelElement)model);
                    diff.setSeverity(super.getSeverity());
                    diff.setStatus(IDifference.Status.UNDEFINED);
                   
                    results.add(diff);
                }
            }
        }
View Full Code Here

TOP

Related Classes of net.sf.jmd.evaluation.IDifference

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.