Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

overridingMethods on a method contained in a FamixJavaParameterType does not work #831

Open
LABSARI opened this issue Oct 2, 2024 · 1 comment

Comments

@LABSARI
Copy link
Collaborator

LABSARI commented Oct 2, 2024

interface Actionable {
    void doSomething();
}
public class ParametricClass<T extends Actionable> {

    private T object;
    public ParametricClass(T object) {
        this.object = object;
    }
    public void foo() {
        object.doSomething();
    }
    
}
class MyAction implements Actionable {
    @Override
    public void doSomething() {
        System.out.println("Action performed!");
    }
}

In above example, object field is of type T and the method doSomething() is called on object.
doSomething() method is defined in the interface Actionable, if we look for the its overriding within MyAction class with message overridingMthods, there is an exception raised (FamixJavaParameterType does not understand addMethodOverriding: in:).

@LABSARI
Copy link
Collaborator Author

LABSARI commented Oct 2, 2024

By the way, should a type parameter contain methods?
Because doSometing method is associated with the Actionable interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant