-
Notifications
You must be signed in to change notification settings - Fork 64
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
Add an API for querying inheritance #27
Comments
@sfPlayer1 Does this
|
You can only get parents through the current API, not the childern. But I think it's possible to add an API for this. This will up to @sfPlayer1 . |
Querying children is always unreliable, as even the JVM doesn't know the full set of children for any non-final (or non-sealed) class at runtime; new classes can always be loaded to extend an existing class. |
What you said is true in general. However, for tiny-remapper, if you give all class files into tiny-remapper, then it does know all the children (ofc limited in what your input is). And there is a field Just need to add Collection<TrClass> getChildren() {
return Collections.unmodifiedList(this.childern);
} should do the trick. However, some consideration is needed.
|
for the purpose seen in the original issue, I think getting the parent is enough. In addition, we have
So I argue that our current api suffices for the use cases. |
As Player suggested on Discord, it seems like
ClassInstance#children
fufills this requirement, but there would need to be a public interface for accessing it.The text was updated successfully, but these errors were encountered: