Created
December 21, 2009 22:10
-
-
Save wiecklabs/261296 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Compiled from "Person.java" | |
public class Person extends java.lang.Object implements java.io.Serializable | |
SourceFile: "Person.java" | |
RuntimeVisibleAnnotations: length = 0xF | |
00 02 00 14 00 00 00 15 00 01 00 16 73 00 17 | |
minor version: 0 | |
major version: 50 | |
Constant pool: | |
const #1 = Method #4.#24; // java/lang/Object."<init>":()V | |
const #2 = Field #3.#25; // Person.id:J | |
const #3 = class #26; // Person | |
const #4 = class #27; // java/lang/Object | |
const #5 = class #28; // java/io/Serializable | |
const #6 = Asciz id; | |
const #7 = Asciz J; | |
const #8 = Asciz <init>; | |
const #9 = Asciz ()V; | |
const #10 = Asciz Code; | |
const #11 = Asciz LineNumberTable; | |
const #12 = Asciz getId; | |
const #13 = Asciz ()J; | |
const #14 = Asciz RuntimeVisibleAnnotations; | |
const #15 = Asciz Ljavax/persistence/Id;; | |
const #16 = Asciz setId; | |
const #17 = Asciz (J)V; | |
const #18 = Asciz SourceFile; | |
const #19 = Asciz Person.java; | |
const #20 = Asciz Ljavax/persistence/Entity;; | |
const #21 = Asciz Ljavax/persistence/Table;; | |
const #22 = Asciz name; | |
const #23 = Asciz people; | |
const #24 = NameAndType #8:#9;// "<init>":()V | |
const #25 = NameAndType #6:#7;// id:J | |
const #26 = Asciz Person; | |
const #27 = Asciz java/lang/Object; | |
const #28 = Asciz java/io/Serializable; | |
{ | |
public Person(); | |
Code: | |
Stack=1, Locals=1, Args_size=1 | |
0: aload_0 | |
1: invokespecial #1; //Method java/lang/Object."<init>":()V | |
4: return | |
LineNumberTable: | |
line 5: 0 | |
public long getId(); | |
Code: | |
Stack=2, Locals=1, Args_size=1 | |
0: aload_0 | |
1: getfield #2; //Field id:J | |
4: lreturn | |
LineNumberTable: | |
line 12: 0 | |
RuntimeVisibleAnnotations: length = 0x6 | |
00 01 00 0F 00 00 | |
public void setId(long); | |
Code: | |
Stack=3, Locals=3, Args_size=2 | |
0: aload_0 | |
1: lload_1 | |
2: putfield #2; //Field id:J | |
5: return | |
LineNumberTable: | |
line 16: 0 | |
line 17: 5 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.persistence.*; | |
@Entity | |
@Table(name="people") | |
public class Person implements java.io.Serializable { | |
private long id; | |
@Id | |
public long getId() { | |
return id; | |
} | |
public void setId(long id) { | |
this.id = id | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "javax.persistence.jar" | |
class Person | |
include java.io.Serializable | |
add_class_annotation javax.persistence.Entity => nil | |
add_class_annotation javax.persistence.Table => { "name" => "people" } | |
def getId | |
@id | |
end | |
add_method_signature "getId", [java.lang.Long] | |
add_method_annotation "getId", javax.persistence.Id => nil | |
def setId(id) | |
@id = id | |
end | |
add_method_signature "setId", [java.lang.Void, java.lang.Long] | |
end | |
Person.become_java!(".") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ruby.Person extends org.jruby.RubyObject implements java.io.Serializable | |
RuntimeVisibleAnnotations: length = 0xF | |
00 02 00 07 00 01 00 08 73 00 09 00 0A 00 00 | |
minor version: 0 | |
major version: 50 | |
Constant pool: | |
const #1 = Asciz ruby/Person; | |
const #2 = class #1; // ruby/Person | |
const #3 = Asciz org/jruby/RubyObject; | |
const #4 = class #3; // org/jruby/RubyObject | |
const #5 = Asciz java/io/Serializable; | |
const #6 = class #5; // java/io/Serializable | |
const #7 = Asciz Ljavax/persistence/Table;; | |
const #8 = Asciz name; | |
const #9 = Asciz people; | |
const #10 = Asciz Ljavax/persistence/Entity;; | |
const #11 = Asciz ruby; | |
const #12 = Asciz Lorg/jruby/Ruby;; | |
const #13 = Asciz rubyClass; | |
const #14 = Asciz Lorg/jruby/RubyClass;; | |
const #15 = Asciz clinit; | |
const #16 = Asciz (Lorg/jruby/Ruby;Lorg/jruby/RubyClass;)V; | |
const #17 = NameAndType #11:#12;// ruby:Lorg/jruby/Ruby; | |
const #18 = Field #2.#17; // ruby/Person.ruby:Lorg/jruby/Ruby; | |
const #19 = NameAndType #13:#14;// rubyClass:Lorg/jruby/RubyClass; | |
const #20 = Field #2.#19; // ruby/Person.rubyClass:Lorg/jruby/RubyClass; | |
const #21 = Asciz <init>; | |
const #22 = NameAndType #21:#16;// "<init>":(Lorg/jruby/Ruby;Lorg/jruby/RubyClass;)V | |
const #23 = Method #4.#22; // org/jruby/RubyObject."<init>":(Lorg/jruby/Ruby;Lorg/jruby/RubyClass;)V | |
const #24 = Asciz ()V; | |
const #25 = Asciz toJava; | |
const #26 = Asciz (Ljava/lang/Class;)Ljava/lang/Object;; | |
const #27 = Asciz _equal_equal_equal_; | |
const #28 = Asciz ([Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;; | |
const #29 = Asciz ===; | |
const #30 = String #29; // === | |
const #31 = Asciz callMethod; | |
const #32 = Asciz (Ljava/lang/String;[Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;; | |
const #33 = NameAndType #31:#32;// callMethod:(Ljava/lang/String;[Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject; | |
const #34 = Method #2.#33; // ruby/Person.callMethod:(Ljava/lang/String;[Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject; | |
const #35 = Asciz java_class; | |
const #36 = Asciz ()Lorg/jruby/runtime/builtin/IRubyObject;; | |
const #37 = String #35; // java_class | |
const #38 = Asciz (Ljava/lang/String;)Lorg/jruby/runtime/builtin/IRubyObject;; | |
const #39 = NameAndType #31:#38;// callMethod:(Ljava/lang/String;)Lorg/jruby/runtime/builtin/IRubyObject; | |
const #40 = Method #2.#39; // ruby/Person.callMethod:(Ljava/lang/String;)Lorg/jruby/runtime/builtin/IRubyObject; | |
const #41 = Asciz __jcreate_meta_b_; | |
const #42 = Asciz __jcreate_meta!; | |
const #43 = String #42; // __jcreate_meta! | |
const #44 = Asciz setId; | |
const #45 = Asciz (J)V; | |
const #46 = String #44; // setId | |
const #47 = Asciz org/jruby/runtime/builtin/IRubyObject; | |
const #48 = class #47; // org/jruby/runtime/builtin/IRubyObject | |
const #49 = Asciz org/jruby/javasupport/JavaUtil; | |
const #50 = class #49; // org/jruby/javasupport/JavaUtil | |
const #51 = Asciz convertJavaToRuby; | |
const #52 = Asciz (Lorg/jruby/Ruby;J)Lorg/jruby/runtime/builtin/IRubyObject;; | |
const #53 = NameAndType #51:#52;// convertJavaToRuby:(Lorg/jruby/Ruby;J)Lorg/jruby/runtime/builtin/IRubyObject; | |
const #54 = Method #50.#53; // org/jruby/javasupport/JavaUtil.convertJavaToRuby:(Lorg/jruby/Ruby;J)Lorg/jruby/runtime/builtin/IRubyObject; | |
const #55 = Asciz old_eqq; | |
const #56 = String #55; // old_eqq | |
const #57 = Asciz getId; | |
const #58 = Asciz ()J; | |
const #59 = Asciz Ljavax/persistence/Id;; | |
const #60 = String #57; // getId | |
const #61 = Asciz NULL_ARRAY; | |
const #62 = Asciz [Lorg/jruby/runtime/builtin/IRubyObject;; | |
const #63 = NameAndType #61:#62;// NULL_ARRAY:[Lorg/jruby/runtime/builtin/IRubyObject; | |
const #64 = Field #48.#63; // org/jruby/runtime/builtin/IRubyObject.NULL_ARRAY:[Lorg/jruby/runtime/builtin/IRubyObject; | |
const #65 = Asciz java/lang/Long; | |
const #66 = class #65; // java/lang/Long | |
const #67 = NameAndType #25:#26;// toJava:(Ljava/lang/Class;)Ljava/lang/Object; | |
const #68 = InterfaceMethod #48.#67; // org/jruby/runtime/builtin/IRubyObject.toJava:(Ljava/lang/Class;)Ljava/lang/Object; | |
const #69 = Asciz java/lang/Number; | |
const #70 = class #69; // java/lang/Number | |
const #71 = Asciz longValue; | |
const #72 = NameAndType #71:#58;// longValue:()J | |
const #73 = Method #70.#72; // java/lang/Number.longValue:()J | |
const #74 = Asciz Code; | |
const #75 = Asciz RuntimeVisibleAnnotations; | |
{ | |
public static void clinit(org.jruby.Ruby, org.jruby.RubyClass); | |
Code: | |
Stack=1, Locals=2, Args_size=2 | |
0: aload_0 | |
1: putstatic #18; //Field ruby:Lorg/jruby/Ruby; | |
4: aload_1 | |
5: putstatic #20; //Field rubyClass:Lorg/jruby/RubyClass; | |
8: return | |
public ruby.Person(org.jruby.Ruby, org.jruby.RubyClass); | |
Code: | |
Stack=3, Locals=3, Args_size=3 | |
0: aload_0 | |
1: aload_1 | |
2: aload_2 | |
3: invokespecial #23; //Method org/jruby/RubyObject."<init>":(Lorg/jruby/Ruby;Lorg/jruby/RubyClass;)V | |
6: return | |
public ruby.Person(); | |
Code: | |
Stack=3, Locals=1, Args_size=1 | |
0: aload_0 | |
1: getstatic #18; //Field ruby:Lorg/jruby/Ruby; | |
4: getstatic #20; //Field rubyClass:Lorg/jruby/RubyClass; | |
7: invokespecial #23; //Method org/jruby/RubyObject."<init>":(Lorg/jruby/Ruby;Lorg/jruby/RubyClass;)V | |
10: return | |
public java.lang.Object toJava(java.lang.Class); | |
Code: | |
Stack=1, Locals=2, Args_size=2 | |
0: aload_0 | |
1: areturn | |
public org.jruby.runtime.builtin.IRubyObject _equal_equal_equal_(org.jruby.runtime.builtin.IRubyObject[]); | |
Code: | |
Stack=3, Locals=2, Args_size=2 | |
0: aload_0 | |
1: ldc #30; //String === | |
3: aload_1 | |
4: invokevirtual #34; //Method callMethod:(Ljava/lang/String;[Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject; | |
7: areturn | |
public org.jruby.runtime.builtin.IRubyObject java_class(); | |
Code: | |
Stack=2, Locals=1, Args_size=1 | |
0: aload_0 | |
1: ldc #37; //String java_class | |
3: invokevirtual #40; //Method callMethod:(Ljava/lang/String;)Lorg/jruby/runtime/builtin/IRubyObject; | |
6: areturn | |
public org.jruby.runtime.builtin.IRubyObject __jcreate_meta_b_(org.jruby.runtime.builtin.IRubyObject[]); | |
Code: | |
Stack=3, Locals=2, Args_size=2 | |
0: aload_0 | |
1: ldc #43; //String __jcreate_meta! | |
3: aload_1 | |
4: invokevirtual #34; //Method callMethod:(Ljava/lang/String;[Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject; | |
7: areturn | |
public void setId(long); | |
Code: | |
Stack=8, Locals=4, Args_size=2 | |
0: getstatic #18; //Field ruby:Lorg/jruby/Ruby; | |
3: astore_3 | |
4: aload_0 | |
5: ldc #46; //String setId | |
7: iconst_1 | |
8: anewarray #48; //class org/jruby/runtime/builtin/IRubyObject | |
11: dup | |
12: iconst_0 | |
13: aload_3 | |
14: lload_1 | |
15: invokestatic #54; //Method org/jruby/javasupport/JavaUtil.convertJavaToRuby:(Lorg/jruby/Ruby;J)Lorg/jruby/runtime/builtin/IRubyObject; | |
18: aastore | |
19: invokevirtual #34; //Method callMethod:(Ljava/lang/String;[Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject; | |
22: return | |
public org.jruby.runtime.builtin.IRubyObject old_eqq(org.jruby.runtime.builtin.IRubyObject[]); | |
Code: | |
Stack=3, Locals=2, Args_size=2 | |
0: aload_0 | |
1: ldc #56; //String old_eqq | |
3: aload_1 | |
4: invokevirtual #34; //Method callMethod:(Ljava/lang/String;[Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject; | |
7: areturn | |
public long getId(); | |
Code: | |
Stack=3, Locals=2, Args_size=1 | |
0: getstatic #18; //Field ruby:Lorg/jruby/Ruby; | |
3: astore_1 | |
4: aload_0 | |
5: ldc #60; //String getId | |
7: getstatic #64; //Field org/jruby/runtime/builtin/IRubyObject.NULL_ARRAY:[Lorg/jruby/runtime/builtin/IRubyObject; | |
10: invokevirtual #34; //Method callMethod:(Ljava/lang/String;[Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject; | |
13: ldc #66; //class java/lang/Long | |
15: invokeinterface #68, 2; //InterfaceMethod org/jruby/runtime/builtin/IRubyObject.toJava:(Ljava/lang/Class;)Ljava/lang/Object; | |
20: checkcast #70; //class java/lang/Number | |
23: invokevirtual #73; //Method java/lang/Number.longValue:()J | |
26: lreturn | |
RuntimeVisibleAnnotations: length = 0x6 | |
00 01 00 3B 00 00 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment