public final class org.jruby.ext.ffi.StructByReference extends org.jruby.RubyObject
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: org.jruby.ext.ffi.StructByReference
super_class: org.jruby.RubyObject
{
private org.jruby.ext.ffi.StructLayout structLayout;
descriptor: Lorg/jruby/ext/ffi/StructLayout;
flags: (0x0002) ACC_PRIVATE
private final org.jruby.RubyClass structClass;
descriptor: Lorg/jruby/RubyClass;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
public static org.jruby.RubyClass createStructByReferenceClass(org.jruby.Ruby, org.jruby.RubyModule);
descriptor: (Lorg/jruby/Ruby;Lorg/jruby/RubyModule;)Lorg/jruby/RubyClass;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=3, args_size=2
start local 0 start local 1 0: aload 1
ldc "StructByReference"
aload 0
invokevirtual org.jruby.Ruby.getObject:()Lorg/jruby/RubyClass;
1: getstatic org.jruby.runtime.ObjectAllocator.NOT_ALLOCATABLE_ALLOCATOR:Lorg/jruby/runtime/ObjectAllocator;
2: invokevirtual org.jruby.RubyModule.defineClassUnder:(Ljava/lang/String;Lorg/jruby/RubyClass;Lorg/jruby/runtime/ObjectAllocator;)Lorg/jruby/RubyClass;
astore 2
start local 2 3: aload 2
ldc Lorg/jruby/ext/ffi/StructByReference;
invokevirtual org.jruby.RubyClass.defineAnnotatedMethods:(Ljava/lang/Class;)V
4: aload 2
ldc Lorg/jruby/ext/ffi/StructByReference;
invokevirtual org.jruby.RubyClass.defineAnnotatedConstants:(Ljava/lang/Class;)V
5: aload 2
aload 1
ldc "DataConverter"
invokevirtual org.jruby.RubyModule.getConstant:(Ljava/lang/String;)Lorg/jruby/runtime/builtin/IRubyObject;
invokevirtual org.jruby.RubyClass.includeModule:(Lorg/jruby/runtime/builtin/IRubyObject;)V
6: aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 runtime Lorg/jruby/Ruby;
0 7 1 ffiModule Lorg/jruby/RubyModule;
3 7 2 sbrClass Lorg/jruby/RubyClass;
MethodParameters:
Name Flags
runtime
ffiModule
public static final org.jruby.runtime.builtin.IRubyObject newStructByReference(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
Code:
stack=6, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 2
instanceof org.jruby.RubyClass
ifne 4
1: aload 0
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
new java.lang.StringBuilder
dup
ldc "wrong argument type "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
2: aload 2
invokeinterface org.jruby.runtime.builtin.IRubyObject.getMetaClass:()Lorg/jruby/RubyClass;
invokevirtual org.jruby.RubyClass.getName:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc " (expected Class)"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
3: invokevirtual org.jruby.Ruby.newTypeError:(Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
4: StackMap locals:
StackMap stack:
aload 2
checkcast org.jruby.RubyClass
aload 0
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
invokevirtual org.jruby.Ruby.getFFI:()Lorg/jruby/ext/ffi/FFI;
getfield org.jruby.ext.ffi.FFI.structClass:Lorg/jruby/RubyClass;
invokevirtual org.jruby.RubyClass.isKindOfModule:(Lorg/jruby/RubyModule;)Z
ifne 8
5: aload 0
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
new java.lang.StringBuilder
dup
ldc "wrong argument type "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
6: aload 2
invokeinterface org.jruby.runtime.builtin.IRubyObject.getMetaClass:()Lorg/jruby/RubyClass;
invokevirtual org.jruby.RubyClass.getName:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc " (expected subclass of FFI::Struct)"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
7: invokevirtual org.jruby.Ruby.newTypeError:(Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
8: StackMap locals:
StackMap stack:
new org.jruby.ext.ffi.StructByReference
dup
aload 0
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
aload 1
checkcast org.jruby.RubyClass
9: aload 2
checkcast org.jruby.RubyClass
aconst_null
10: invokespecial org.jruby.ext.ffi.StructByReference.<init>:(Lorg/jruby/Ruby;Lorg/jruby/RubyClass;Lorg/jruby/RubyClass;Lorg/jruby/ext/ffi/StructLayout;)V
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 context Lorg/jruby/runtime/ThreadContext;
0 11 1 klass Lorg/jruby/runtime/builtin/IRubyObject;
0 11 2 structClass Lorg/jruby/runtime/builtin/IRubyObject;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(name = {"new"}, meta = true)
MethodParameters:
Name Flags
context
klass
structClass
private void <init>(org.jruby.Ruby, org.jruby.RubyClass, org.jruby.RubyClass, org.jruby.ext.ffi.StructLayout);
descriptor: (Lorg/jruby/Ruby;Lorg/jruby/RubyClass;Lorg/jruby/RubyClass;Lorg/jruby/ext/ffi/StructLayout;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=5, args_size=5
start local 0 start local 1 start local 2 start local 3 start local 4 0: aload 0
aload 1
aload 2
invokespecial org.jruby.RubyObject.<init>:(Lorg/jruby/Ruby;Lorg/jruby/RubyClass;)V
1: aload 0
aload 3
putfield org.jruby.ext.ffi.StructByReference.structClass:Lorg/jruby/RubyClass;
2: aload 0
aload 4
putfield org.jruby.ext.ffi.StructByReference.structLayout:Lorg/jruby/ext/ffi/StructLayout;
3: return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/jruby/ext/ffi/StructByReference;
0 4 1 runtime Lorg/jruby/Ruby;
0 4 2 klass Lorg/jruby/RubyClass;
0 4 3 structClass Lorg/jruby/RubyClass;
0 4 4 layout Lorg/jruby/ext/ffi/StructLayout;
MethodParameters:
Name Flags
runtime
klass
structClass
layout
public final org.jruby.runtime.builtin.IRubyObject to_s(org.jruby.runtime.ThreadContext);
descriptor: (Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
Code:
stack=6, locals=2, args_size=2
start local 0 start local 1 0: aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
ldc "#<FFI::StructByReference:%s>"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 0
getfield org.jruby.ext.ffi.StructByReference.structClass:Lorg/jruby/RubyClass;
invokevirtual org.jruby.RubyClass.getName:()Ljava/lang/String;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokestatic org.jruby.RubyString.newString:(Lorg/jruby/Ruby;Ljava/lang/String;)Lorg/jruby/RubyString;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/ext/ffi/StructByReference;
0 1 1 context Lorg/jruby/runtime/ThreadContext;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(name = {"to_s"})
MethodParameters:
Name Flags
context
public final org.jruby.runtime.builtin.IRubyObject layout(org.jruby.runtime.ThreadContext);
descriptor: (Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield org.jruby.ext.ffi.StructByReference.structLayout:Lorg/jruby/ext/ffi/StructLayout;
ifnonnull 2
1: aload 0
aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
aload 0
getfield org.jruby.ext.ffi.StructByReference.structClass:Lorg/jruby/RubyClass;
invokestatic org.jruby.ext.ffi.Struct.getStructLayout:(Lorg/jruby/Ruby;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/ext/ffi/StructLayout;
putfield org.jruby.ext.ffi.StructByReference.structLayout:Lorg/jruby/ext/ffi/StructLayout;
2: StackMap locals:
StackMap stack:
aload 0
getfield org.jruby.ext.ffi.StructByReference.structLayout:Lorg/jruby/ext/ffi/StructLayout;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/jruby/ext/ffi/StructByReference;
0 3 1 context Lorg/jruby/runtime/ThreadContext;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(name = {"layout"})
MethodParameters:
Name Flags
context
public final org.jruby.runtime.builtin.IRubyObject struct_class(org.jruby.runtime.ThreadContext);
descriptor: (Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
Code:
stack=1, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield org.jruby.ext.ffi.StructByReference.structClass:Lorg/jruby/RubyClass;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/ext/ffi/StructByReference;
0 1 1 context Lorg/jruby/runtime/ThreadContext;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(name = {"struct_class"})
MethodParameters:
Name Flags
context
public org.jruby.runtime.builtin.IRubyObject native_type(org.jruby.runtime.ThreadContext);
descriptor: (Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
invokevirtual org.jruby.Ruby.getFFI:()Lorg/jruby/ext/ffi/FFI;
getfield org.jruby.ext.ffi.FFI.typeClass:Lorg/jruby/RubyClass;
ldc "POINTER"
invokevirtual org.jruby.RubyClass.getConstant:(Ljava/lang/String;)Lorg/jruby/runtime/builtin/IRubyObject;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/ext/ffi/StructByReference;
0 1 1 context Lorg/jruby/runtime/ThreadContext;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(name = {"native_type"})
MethodParameters:
Name Flags
context
public org.jruby.runtime.builtin.IRubyObject to_native(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 2
instanceof org.jruby.ext.ffi.Struct
ifeq 2
aload 0
getfield org.jruby.ext.ffi.StructByReference.structClass:Lorg/jruby/RubyClass;
aload 2
invokevirtual org.jruby.RubyClass.isInstance:(Lorg/jruby/runtime/builtin/IRubyObject;)Z
ifeq 2
1: aload 2
checkcast org.jruby.ext.ffi.Struct
invokevirtual org.jruby.ext.ffi.Struct.getMemory:()Lorg/jruby/ext/ffi/AbstractMemory;
areturn
2: StackMap locals:
StackMap stack:
aload 2
invokeinterface org.jruby.runtime.builtin.IRubyObject.isNil:()Z
ifeq 4
3: aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
invokestatic org.jruby.ext.ffi.Pointer.getNull:(Lorg/jruby/Ruby;)Lorg/jruby/ext/ffi/Pointer;
areturn
4: StackMap locals:
StackMap stack:
aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
aload 2
aload 0
getfield org.jruby.ext.ffi.StructByReference.structClass:Lorg/jruby/RubyClass;
invokevirtual org.jruby.Ruby.newTypeError:(Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/RubyClass;)Lorg/jruby/exceptions/RaiseException;
athrow
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/jruby/ext/ffi/StructByReference;
0 5 1 context Lorg/jruby/runtime/ThreadContext;
0 5 2 value Lorg/jruby/runtime/builtin/IRubyObject;
0 5 3 ctx Lorg/jruby/runtime/builtin/IRubyObject;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(name = {"to_native"})
MethodParameters:
Name Flags
context
value
ctx
public org.jruby.runtime.builtin.IRubyObject from_native(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 2
instanceof org.jruby.ext.ffi.AbstractMemory
ifeq 2
1: aload 0
invokevirtual org.jruby.ext.ffi.StructByReference.getStructClass:()Lorg/jruby/RubyClass;
aload 1
aload 2
getstatic org.jruby.runtime.Block.NULL_BLOCK:Lorg/jruby/runtime/Block;
invokevirtual org.jruby.RubyClass.newInstance:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;
areturn
2: StackMap locals:
StackMap stack:
aload 2
invokeinterface org.jruby.runtime.builtin.IRubyObject.isNil:()Z
ifeq 4
3: aload 0
invokevirtual org.jruby.ext.ffi.StructByReference.getStructClass:()Lorg/jruby/RubyClass;
aload 1
aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
invokestatic org.jruby.ext.ffi.Pointer.getNull:(Lorg/jruby/Ruby;)Lorg/jruby/ext/ffi/Pointer;
getstatic org.jruby.runtime.Block.NULL_BLOCK:Lorg/jruby/runtime/Block;
invokevirtual org.jruby.RubyClass.newInstance:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;
areturn
4: StackMap locals:
StackMap stack:
aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
aload 2
aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
invokevirtual org.jruby.Ruby.getFFI:()Lorg/jruby/ext/ffi/FFI;
getfield org.jruby.ext.ffi.FFI.pointerClass:Lorg/jruby/RubyClass;
invokevirtual org.jruby.Ruby.newTypeError:(Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/RubyClass;)Lorg/jruby/exceptions/RaiseException;
athrow
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/jruby/ext/ffi/StructByReference;
0 5 1 context Lorg/jruby/runtime/ThreadContext;
0 5 2 value Lorg/jruby/runtime/builtin/IRubyObject;
0 5 3 ctx Lorg/jruby/runtime/builtin/IRubyObject;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(name = {"from_native"})
MethodParameters:
Name Flags
context
value
ctx
public org.jruby.runtime.builtin.IRubyObject reference_required_p(org.jruby.runtime.ThreadContext);
descriptor: (Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=2, args_size=2
start local 0 start local 1 0: aload 1
getfield org.jruby.runtime.ThreadContext.fals:Lorg/jruby/RubyBoolean;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/ext/ffi/StructByReference;
0 1 1 context Lorg/jruby/runtime/ThreadContext;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(name = {"reference_required?"})
MethodParameters:
Name Flags
context
public final org.jruby.ext.ffi.StructLayout getStructLayout();
descriptor: ()Lorg/jruby/ext/ffi/StructLayout;
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jruby.ext.ffi.StructByReference.structLayout:Lorg/jruby/ext/ffi/StructLayout;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/ext/ffi/StructByReference;
public final org.jruby.RubyClass getStructClass();
descriptor: ()Lorg/jruby/RubyClass;
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jruby.ext.ffi.StructByReference.structClass:Lorg/jruby/RubyClass;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/ext/ffi/StructByReference;
}
SourceFile: "StructByReference.java"
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyClass(name = {"FFI::StructByReference"}, parent = "Object")