public final class org.jruby.ext.ffi.StructByValue extends org.jruby.ext.ffi.Type
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: org.jruby.ext.ffi.StructByValue
super_class: org.jruby.ext.ffi.Type
{
private final org.jruby.ext.ffi.StructLayout structLayout;
descriptor: Lorg/jruby/ext/ffi/StructLayout;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final org.jruby.RubyClass structClass;
descriptor: Lorg/jruby/RubyClass;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
public static org.jruby.RubyClass createStructByValueClass(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=4, args_size=2
start local 0 start local 1 0: aload 1
ldc "Type"
invokevirtual org.jruby.RubyModule.getClass:(Ljava/lang/String;)Lorg/jruby/RubyClass;
astore 2
start local 2 1: aload 1
ldc "StructByValue"
aload 2
getstatic org.jruby.runtime.ObjectAllocator.NOT_ALLOCATABLE_ALLOCATOR:Lorg/jruby/runtime/ObjectAllocator;
invokevirtual org.jruby.RubyModule.defineClassUnder:(Ljava/lang/String;Lorg/jruby/RubyClass;Lorg/jruby/runtime/ObjectAllocator;)Lorg/jruby/RubyClass;
astore 3
start local 3 2: aload 3
ldc Lorg/jruby/ext/ffi/StructByValue;
invokevirtual org.jruby.RubyClass.defineAnnotatedMethods:(Ljava/lang/Class;)V
3: aload 3
ldc Lorg/jruby/ext/ffi/StructByValue;
invokevirtual org.jruby.RubyClass.defineAnnotatedConstants:(Ljava/lang/Class;)V
4: aload 2
ldc "Struct"
aload 3
invokevirtual org.jruby.RubyClass.setConstant:(Ljava/lang/String;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
pop
5: aload 3
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 runtime Lorg/jruby/Ruby;
0 6 1 ffiModule Lorg/jruby/RubyModule;
1 6 2 Type Lorg/jruby/RubyClass;
2 6 3 sbvClass Lorg/jruby/RubyClass;
MethodParameters:
Name Flags
runtime
ffiModule
public static final org.jruby.runtime.builtin.IRubyObject newStructByValue(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=7, 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.StructByValue
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
aload 0
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
aload 2
invokestatic org.jruby.ext.ffi.Struct.getStructLayout:(Lorg/jruby/Ruby;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/ext/ffi/StructLayout;
10: invokespecial org.jruby.ext.ffi.StructByValue.<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=6, 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
getstatic org.jruby.ext.ffi.NativeType.STRUCT:Lorg/jruby/ext/ffi/NativeType;
aload 4
getfield org.jruby.ext.ffi.StructLayout.size:I
aload 4
getfield org.jruby.ext.ffi.StructLayout.alignment:I
invokespecial org.jruby.ext.ffi.Type.<init>:(Lorg/jruby/Ruby;Lorg/jruby/RubyClass;Lorg/jruby/ext/ffi/NativeType;II)V
1: aload 0
aload 3
putfield org.jruby.ext.ffi.StructByValue.structClass:Lorg/jruby/RubyClass;
2: aload 0
aload 4
putfield org.jruby.ext.ffi.StructByValue.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/StructByValue;
0 4 1 runtime Lorg/jruby/Ruby;
0 4 2 klass Lorg/jruby/RubyClass;
0 4 3 structClass Lorg/jruby/RubyClass;
0 4 4 structLayout Lorg/jruby/ext/ffi/StructLayout;
MethodParameters:
Name Flags
runtime
klass
structClass
structLayout
void <init>(org.jruby.Ruby, org.jruby.RubyClass, org.jruby.ext.ffi.StructLayout);
descriptor: (Lorg/jruby/Ruby;Lorg/jruby/RubyClass;Lorg/jruby/ext/ffi/StructLayout;)V
flags: (0x0000)
Code:
stack=6, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
aload 1
aload 1
ldc "FFI"
invokevirtual org.jruby.Ruby.getModule:(Ljava/lang/String;)Lorg/jruby/RubyModule;
ldc "Type"
invokevirtual org.jruby.RubyModule.getClass:(Ljava/lang/String;)Lorg/jruby/RubyClass;
ldc "Struct"
invokevirtual org.jruby.RubyClass.getClass:(Ljava/lang/String;)Lorg/jruby/RubyClass;
1: getstatic org.jruby.ext.ffi.NativeType.STRUCT:Lorg/jruby/ext/ffi/NativeType;
aload 3
getfield org.jruby.ext.ffi.StructLayout.size:I
aload 3
getfield org.jruby.ext.ffi.StructLayout.alignment:I
invokespecial org.jruby.ext.ffi.Type.<init>:(Lorg/jruby/Ruby;Lorg/jruby/RubyClass;Lorg/jruby/ext/ffi/NativeType;II)V
2: aload 0
aload 2
putfield org.jruby.ext.ffi.StructByValue.structClass:Lorg/jruby/RubyClass;
3: aload 0
aload 3
putfield org.jruby.ext.ffi.StructByValue.structLayout:Lorg/jruby/ext/ffi/StructLayout;
4: return
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/StructByValue;
0 5 1 runtime Lorg/jruby/Ruby;
0 5 2 structClass Lorg/jruby/RubyClass;
0 5 3 structLayout Lorg/jruby/ext/ffi/StructLayout;
MethodParameters:
Name Flags
runtime
structClass
structLayout
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::StructByValue:%s>"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 0
getfield org.jruby.ext.ffi.StructByValue.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/StructByValue;
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=1, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield org.jruby.ext.ffi.StructByValue.structLayout:Lorg/jruby/ext/ffi/StructLayout;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/ext/ffi/StructByValue;
0 1 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.StructByValue.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/StructByValue;
0 1 1 context Lorg/jruby/runtime/ThreadContext;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(name = {"struct_class"})
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.StructByValue.structLayout:Lorg/jruby/ext/ffi/StructLayout;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/ext/ffi/StructByValue;
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.StructByValue.structClass:Lorg/jruby/RubyClass;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/ext/ffi/StructByValue;
}
SourceFile: "StructByValue.java"
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyClass(name = {"FFI::StructByValue"}, parent = "FFI::Type")