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

add support for override analysis #274

Closed
monperrus opened this issue Jun 30, 2015 · 5 comments
Closed

add support for override analysis #274

monperrus opened this issue Jun 30, 2015 · 5 comments

Comments

@monperrus
Copy link
Collaborator

We have a transformation that requires a method that gives the overridden method.

CtMethod {
  // returns the overridden method, null if none 
  CtMethod getOverridenMethod()

}
@monperrus
Copy link
Collaborator Author

to get the first declaration of the method it would be something like:

m = meth.getOverridenMethod();
while (m!=null)  {
  m = m.getOverridenMethod();
}

@monperrus
Copy link
Collaborator Author

should it be CtExecutableReferene getOverridenMethod()?

@monperrus
Copy link
Collaborator Author

the implementation may reuse CtExecutableReference.isOverriding()

@GerardPaligot
Copy link
Contributor

We should talk where we put this method. I don't think we should put it in the AST but in a query space where we can put utility methods like this one.

@GerardPaligot
Copy link
Contributor

2 filters for this issue:

  • OverridenMethodFilter where 0 is the top overriden method.
  • OverridingMethodFilter to get all method below the current method overriden or declared excluding itself.

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

2 participants