-
-
Notifications
You must be signed in to change notification settings - Fork 356
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
Overriding/OverriddenMethodFilter #452
Conversation
public class OverridingMethodFilter implements Filter<CtMethod<?>> { | ||
private final CtExecutableReference<?> executableReference; | ||
|
||
public OverridingMethodFilter(CtExecutableReference<?> executableReference) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Take as parameter a CtMethod (and not a reference)?
avoid the getReference in usage (cf test) with encapsulatio
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I adopted the same logic of InvocationFilter
for this: https://github.com/INRIA/spoon/blob/master/src/main/java/spoon/reflect/visitor/filter/InvocationFilter.java
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea to have a regular design. but I would rather update
CtInvocationFilter with a new constructor with a CtMethod.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need a CtMethod
in InvocationFilter
. Why we should have a constructor useless?
We need it for regaularity in the API. And this will be useful for users in the future. |
@monperrus PR ok. |
Closes #274