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
feat: add method getTopDefinitions() to identify first signature in superclass/superinterface #1821
Comments
The first failure is on class CtScanner implements CtVisitor {
public <T> void visitCtAnnotationMethod(spoon.reflect.declaration.CtAnnotationMethod<T> annotationMethod) {...}
} and it fails, because WDYT? |
Interesting, it means that getOverridingExecutable gives the super implementation but not the super declaration. I'll do a PR to update the documentation. What about creating a new method The signature could be
WDYT? |
where would that May be we should not add new method on CtExecutableReference - because there is many possibilities what client might need, but we should instead implement new mapping function
Then client can call CtExecutableReference eref = ...
eref.map(new MethodDeclarationFunction().checkInterfaces(true)).first() to get first definition of method in some interface. WDYT? |
May be we should not add new method on CtExecutableReference
yes, I also prefer to have this new method only in CtMethod
|
where would that |getTopDefinition| algorithm search in?
A) in direct implemening interfaces only
B) in all implementing intefaces recursively
C) in superClasses + A) or B)
D) ?
I would say C), it makes the most sense to me.
|
question: bug in getOverridingExecutable? sometimes the overridden method is not found
See monperrus@774e719
@pvojtechovsky this seems to be in parameter adaptation, could you have a look at it? Thanks!
The text was updated successfully, but these errors were encountered: