$$Lambda$ class files
See original GitHub issueCFR version
CFR 0.151
Compiler
unknown, java 8?
Description
When decompiling .jar file (decompiled with dex2jar, also tried enjarify, same output), i get multiple $$Lambda$ .class files along with some .class files, but in code clogged with unreadable code. But when i ran in procyon, it decompiled without those $$Lambda$ .class files, and at least got all in one place, in java, even if not perfect. So it must have to do with Java 8 lambda expressions, or whatever it is.
Example
this is file content
ls
InstanceSettings.java
Service.java
'SettingsActivity$$Lambda$14.java'
'SettingsActivity$$Lambda$5.java'
SettingsActivity.java
'Provider$$Lambda$1.java'
'SettingsActivity$$Lambda$10.java'
'SettingsActivity$$Lambda$1.java'
'SettingsActivity$$Lambda$6.java'
Settings.java
'Provider$$Lambda$2.java'
'SettingsActivity$$Lambda$11.java'
'SettingsActivity$$Lambda$2.java'
'SettingsActivity$$Lambda$7.java'
Provider.java
'SettingsActivity$$Lambda$12.java'
'SettingsActivity$$Lambda$3.java'
'SettingsActivity$$Lambda$8.java'
RemoteViewsFactory.java
'SettingsActivity$$Lambda$13.java'
'SettingsActivity$$Lambda$4.java'
'SettingsActivity$$Lambda$9.java'
and just a small fraction of code, to see how it looks in code
final class RandomVersePopup$$Lambda$1
implements CompoundButton.OnCheckedChangeListener {
private final RadioButton arg$1;
private RandomVersePopup$$Lambda$1(RadioButton radioButton) {
this.arg$1 = radioButton;
}
private static CompoundButton.OnCheckedChangeListener get$Lambda(RadioButton radioButton) {
return new RandomVersePopup$$Lambda$1(radioButton);
}
public static CompoundButton.OnCheckedChangeListener lambdaFactory$(RadioButton radioButton) {
return new RandomVersePopup$$Lambda$1(radioButton);
}
@LambdaForm.Hidden
public void onCheckedChanged(CompoundButton compoundButton, boolean bl) {
RandomVersePopup.access$lambda$0(this.arg$1, compoundButton, bl);
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (7 by maintainers)
Top Results From Across the Web
Deploy Java Lambda functions with .zip or JAR file archives
This page describes how to create your deployment package as a .zip file or Jar file, and then use the deployment package to...
Read more >What is a Java 8 Lambda Expression Compiled to? [duplicate]
As we are aware, lambda expression/function is an anonymous class method implementation for abstract method in functional interface and if we ...
Read more >Lambda Expressions (The Java™ Tutorials > Learning the ...
Lambda expressions enable you to do this, to treat functionality as method argument, or code as data. The previous section, Anonymous Classes, shows...
Read more >Chapter 4. Operating AWS Lambda Functions - O'Reilly
Operating AWS Lambda Functions This chapter will introduce a more ... In the following example, Library A contains a class file and a...
Read more >symphoniacloud/lambda-packaging: A collection of ... - GitHub
A collection of Maven assembly descriptors for building AWS Lambda deployment ... The resulting .zip file contains compiled class files and resources at...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I don’t like the idea of undoing this sort of thing automatically (especially not something as complex as this), because I want to actually see the java represented by the bytecode.
That being said, I can imagine given code like the above, it’s really useful to see what’s really going on - so - there’s an EXPLICIT argument sugarretrolambda, (hey, it’ll probably never get used, but it’s a nice toy to have).
I’m not going to enable this automatically, so I may add something in the future to warn it might be appropriate.
(also the code’s a bit of a mess 😉 )
Normal
With
--sugarretrolambda true
then again, decompilation is mostly done to understand the code, not to recompile it. and enabled helps understanding…
maybe youll find that sensible defaults are different for analyzing than for roundtripping. a general “roundtrip” option could disable all stuff like this while otherwise defaulting to analysis mode.