Skip to content

Instantly share code, notes, and snippets.

@yenerm
Last active April 22, 2020 04:25
Show Gist options
  • Save yenerm/b03daee02e23c66da62ae6ffbfea2b51 to your computer and use it in GitHub Desktop.
Save yenerm/b03daee02e23c66da62ae6ffbfea2b51 to your computer and use it in GitHub Desktop.
Companion object decompiled to Java
<!-- Copyright 2019 Google LLC.
SPDX-License-Identifier: Apache-2.0 -->
public final class AnotherClass {
private static int count;
public static final AnotherClass.Counter Counter = new AnotherClass.Counter((DefaultConstructorMarker)null);
public static final class Counter {
public final void count() {
AnotherClass.count = AnotherClass.count + 1;
}
private Counter() { }
// $FF: synthetic method
public Counter(DefaultConstructorMarker $constructor_marker) {
this();
}
}
public static final class Companion {
public final void count() {
AnotherClass.count = AnotherClass.count + 1;
}
private Companion() {}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment