How to find generics when running a java process

I'm generating code out of code. To do this I need to scan code to generate the code, this includes generics. Currently I'm using classgraph as the scanner for the code, but it does not look like it supports generics (I believe it's runtime, so generics don't exist there). Does anyone know a way to programmatically fetch generics from a library?
3 Replies
JavaBot
JavaBot2mo ago
This post has been reserved for your question.
Hey @Thorinwasher! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
Thorinwasher
ThorinwasherOP2mo ago
Other than that, I can just say that it's meant to be an integration testing library where you run the process on a docker container, and then have a mirror instance of the API for the process that you can use like the original library, where every method call just does some networking and such to communicate with the containerized process using reflection and that API. Most definitely a stupid idea, but at least interesting, which is why I'm pursuing it at the moment So to clarify, every method in the mirror API will kind of look like this, all autogenerated with the same method names as the API it is based out of:
public String toString() {
return MirrorHandler.handle("toString", this);
}
public String toString() {
return MirrorHandler.handle("toString", this);
}
MirrorHandler does network processing
JavaBot
JavaBot5w ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
Want results from more Discord servers?
Add your server