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

Get class from MethodInvocation #79

Open
paulodamaso opened this issue May 31, 2020 · 0 comments
Open

Get class from MethodInvocation #79

paulodamaso opened this issue May 31, 2020 · 0 comments

Comments

@paulodamaso
Copy link

I'm having a hard time to find the class some MethodInvocation belongs to. For example, I have the following:

class ClassToCall {
    public void someMethod() {
        ....
    }
}

class Caller {
     private ClassToCall var;

     public void otherMethod() {
          this.var.someMethod();
     }
}

I need to know that in someMethod invocation in Caller.otherMethod() I am calling a method from ClassToCall, but all I got from filter(javalang.tree.MethodInvocation) in Caller is

MethodInvocation(arguments=[], member=someMethod, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)

Is there a way to achieve what I need?

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