You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Docs say getExecutableDeclaration() should return CtExecutable even if Spoon should use reflection to do it. There is an example it doesn't and invocation.getExecutable().getExecutableDeclaration() returns null.
Steps to reproduce:
Create
enum E {
}
Create call to E.values() and assign invocation to CtInvocation of it. Now invocation.getExecutable().getExecutableDeclaration() returns null.
Possible reason is that class E is not recognized as subclass of java.lang.Enum because E is in source path and java.lang.Enum isn't and there are no extends declaration on E.
The text was updated successfully, but these errors were encountered:
I wonder why java.lang.Enum isn't reflected as all enum's parent? It actually is! Imho, enum methods aren't different from any other method that is recovered by reflection
Docs say
getExecutableDeclaration()
should returnCtExecutable
even if Spoon should use reflection to do it. There is an example it doesn't andinvocation.getExecutable().getExecutableDeclaration()
returnsnull
.Steps to reproduce:
Create
Create call to
E.values()
and assigninvocation
toCtInvocation
of it. Nowinvocation.getExecutable().getExecutableDeclaration()
returnsnull
.Possible reason is that class
E
is not recognized as subclass ofjava.lang.Enum
becauseE
is in source path andjava.lang.Enum
isn't and there are noextends
declaration onE
.The text was updated successfully, but these errors were encountered: