Skip to content
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 API for providing classpath/library classes #2134

Open
NebelNidas opened this issue Mar 23, 2024 · 2 comments
Open

Add API for providing classpath/library classes #2134

NebelNidas opened this issue Mar 23, 2024 · 2 comments
Labels
Core Issues in jadx-core module discussion new feature
Milestone

Comments

@NebelNidas
Copy link
Contributor

Describe your idea

Fernflower (code, usage) and CFR (code, usage) provide facilities for supplying classes that are not intended for decompilation themselves, but instead act as sources of additional metadata (e.g. for hierarchy completion). I'd like to see something similar implemented in JADX as well.

@skylot
Copy link
Owner

skylot commented Mar 25, 2024

@NebelNidas well I plan to add this feature anyway.
Right ow jadx uses "core classpath" from Android (all needed data from android.jar in condensed storage) and Android apps storing all libraries inside apk, so we don't actually need such additional classpath data.
Such feature only needed for decompiling single/separate classes and only can improve type inference (generics restoration). If you know some other examples than generated code is not correct for such use case, please share 🙂

@skylot skylot added this to the TBD milestone Mar 25, 2024
@skylot skylot added Core Issues in jadx-core module discussion labels Mar 25, 2024
@NebelNidas
Copy link
Contributor Author

NebelNidas commented Mar 29, 2024

well I plan to add this feature anyway.

Nice!

Right ow jadx uses "core classpath" from Android

What about Java classes loaded via the java-input plugin? My current use-case is decompiling Minecraft 😛

only can improve type inference (generics restoration)

From a quick question in the Vineflower Discord, these are some additional benefits that got mentioned:

  • Switch on enums
  • @Override annotations
  • Local type verification
  • Outer and inner class attributes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Issues in jadx-core module discussion new feature
Projects
None yet
Development

No branches or pull requests

2 participants