Skip to content

Instantly share code, notes, and snippets.

@idler
Created July 10, 2017 16:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save idler/7536c55b94b2019b3524867b46f82ebc to your computer and use it in GitHub Desktop.
Save idler/7536c55b94b2019b3524867b46f82ebc to your computer and use it in GitHub Desktop.
return new interface or return new class implemented interface
max@antonov :tmp: 19:24:57 [0] $ javap -c Ber
Compiled from "Ber.java"
class Ber {
Ber();
Code:
0: aload_0
1: invokespecial #1 // Method java/lang/Object."<init>":()V
4: return
public java.io.Serializable getObject();
Code:
0: new #2 // class BerSer
3: dup
4: invokespecial #3 // Method BerSer."<init>":()V
7: areturn
}
max@antonov :tmp: 19:25:00 [0] $ javap -c Ser
Compiled from "Ser.java"
class Ser {
Ser();
Code:
0: aload_0
1: invokespecial #1 // Method java/lang/Object."<init>":()V
4: return
public java.io.Serializable getObject();
Code:
0: new #2 // class Ser$1
3: dup
4: aload_0
5: invokespecial #3 // Method Ser$1."<init>":(LSer;)V
8: areturn
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment