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
review: feature: put generics information concerning method return types and parameters inside shadow classes #1352
Conversation
…with JavaReflectionVisitor
launcher.addInputResource("src/test/java/spoon/test/generics/testclasses/FakeTpl.java"); | ||
launcher.buildModel(); | ||
|
||
CtInterface<?> fakeTplItf = factory.Interface().get("spoon.test.generics.testclasses.FakeTpl"); |
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.
IMHO, you do not get the shadow class but the normal spoon model built from source. To obtain the shadow class
remove launcher.addInputResource("src/test/java/spoon/test/generics/testclasses/FakeTpl.java");
replace this one by factory.Interface().get(spoon.test.generics.testclasses.FakeTpl.class)
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'm doing it line 1003: here, I'm testing that everything is as expected from the model built from source.
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.
OK, for a more readable test, it would be great to extract in an assertion and then you would write
// normal class
checkFakeTpl(factory.Interface().get("spoon.test.generics.testclasses.FakeTpl"))
//shadow class
checkFakeTpl(factory2.Interface().get(spoon.test.generics.testclasses.FakeTpl.class))
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.
OK
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.
Done.
Revapi Analysis resultsOld API: fr.inria.gforge.spoon:spoon-core:jar:5.8.0-20170602.141932-6 New API: fr.inria.gforge.spoon:spoon-core:jar:5.8.0-SNAPSHOT Detected changes: 2. Change 1
Change 2
|
No description provided.