Examples of FamixAttribute


Examples of org.evolizer.famix.model.entities.FamixAttribute

    }

    @Test
    public void testSourceAnchorFieldInitAccess() throws Exception {
        FamixMethod oinitMethod = (FamixMethod) aModel.getElement(aFactory.createMethod("testPackage.ae.Test.<oinit>()", null));
        FamixAttribute containerSum = (FamixAttribute) aModel.getElement(aFactory.createAttribute("testPackage.ae.Test.containerSum", null));

        List<FamixAssociation> accesses = new LinkedList<FamixAssociation>();
        for (FamixAssociation ass : aModel.getAssociations(oinitMethod)) {
            if (ass instanceof FamixAccess && ass.getTo().equals(containerSum)) {
                accesses.add(ass);
View Full Code Here

Examples of org.evolizer.famix.model.entities.FamixAttribute

    }

    @Test
    public void testSourceAnchorFieldAccess() throws Exception {
        FamixMethod fooMethod = (FamixMethod) aModel.getElement(aFactory.createMethod("testPackage.ae.Test.foo()", null));
        FamixAttribute aAttribute = (FamixAttribute) aModel.getElement(aFactory.createAttribute("testPackage.ae.Test.a", null));

        List<FamixAssociation> accesses = new LinkedList<FamixAssociation>();
        for (FamixAssociation ass : aModel.getAssociations(fooMethod)) {
            if (ass instanceof FamixAccess && ass.getTo().equals(aAttribute)) {
                accesses.add(ass);
View Full Code Here

Examples of org.evolizer.famix.model.entities.FamixAttribute

   
    @Test
    public void testAttributeDeclartionwithParametrizedType() {
        FamixClass classSimpleTemplate = (FamixClass) aModel.getElement(aFactory.createClass("testPackage.ae.SimpleTemplate<T>", null));
        FamixClass classTypeT = (FamixClass) aModel.getElement(aFactory.createClass("testPackage.ae.SimpleTemplate$T", null));
        FamixAttribute attributeLastEntry = (FamixAttribute) aModel.getElement(aFactory.createAttribute("testPackage.ae.SimpleTemplate<T>.lastEntry", null));
        FamixAttribute wrongAttributeLastEntry = (FamixAttribute) aModel.getElement(aFactory.createAttribute("testPackage.ae.SimpleTemplate.lastEntry", null));
       
        assertNotNull("FamixModel must contain testPackage.ae.SimpleTemplate<T>", classSimpleTemplate);
        assertNotNull("FamixModel must contain testPackage.ae.SimpleTemplate$T", classTypeT);
        assertNotNull("FamixModel must contain testPackage.ae.SimpleTemplate<T>.lastEntry", attributeLastEntry);
        assertEquals("FamixModel must not contain testPackage.ae.SimpleTemplate.lastEntry", null, wrongAttributeLastEntry);
View Full Code Here

Examples of org.evolizer.famix.model.entities.FamixAttribute

     * @param uniqueName Unique name of attribute (full class name + attribute name).
     * @param parent FamixClass declaring the attribute (optional).
     * @return FamixAttribute.
     */
    public FamixAttribute createAttribute(String uniqueName, AbstractFamixEntity parent) {
        return new FamixAttribute(uniqueName, parent);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.