joaoarthurbm / designwizard

DesignWizard (https://sites.google.com/site/designwizardhomepage/) supports automated inspection of Java programs in a higher level than ASM bytecode manipulator.
Other
17 stars 8 forks source link

Add the extraction of generic types as a LOAD relation #57

Open tacianosilva opened 8 years ago

tacianosilva commented 8 years ago

The lack of generic types extraction caused a failure to return the getCalleeEntities(). For example, the code 1 and 2 below the use of information LocalVariable class is not extracted.

Code Example 1

public Set<FieldNode> getAccessedFields() {
    Set<FieldNode> feedBack = new HashSet<FieldNode>();
    Set<ElementType> accessElements = this.getElements();
    FieldNode field = null;
    for (ElementType element: accessElements) {
        field = (FieldNode) element.getEntity();
        feedBack.add(field);
    }
    return feedBack;
}

An implementation of the extraction of generic types in the FactsEventSourceImpl.genericTypeExtration(entity, signature) as a LOAD relation to represent the relation between this entity and all the types in signature (signature contains generic type notations).

The addition of this feature will cause some impact on getCalleeEntities() methods.