public class org.jruby.util.io.FilenoUtil
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.jruby.util.io.FilenoUtil
super_class: java.lang.Object
{
public static final int FIRST_FAKE_FD;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: 100000
protected final java.util.concurrent.atomic.AtomicInteger internalFilenoIndex;
descriptor: Ljava/util/concurrent/atomic/AtomicInteger;
flags: (0x0014) ACC_PROTECTED, ACC_FINAL
private final org.jruby.util.collections.NonBlockingHashMapLong<org.jruby.util.io.ChannelFD> filenoMap;
descriptor: Lorg/jruby/util/collections/NonBlockingHashMapLong;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Lorg/jruby/util/collections/NonBlockingHashMapLong<Lorg/jruby/util/io/ChannelFD;>;
private final jnr.posix.POSIX posix;
descriptor: Ljnr/posix/POSIX;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final org.jruby.util.io.FilenoUtil$WinC winc;
descriptor: Lorg/jruby/util/io/FilenoUtil$WinC;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
static final org.jruby.util.log.Logger LOG;
descriptor: Lorg/jruby/util/log/Logger;
flags: (0x0018) ACC_STATIC, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc Lorg/jruby/util/io/FilenoUtil;
invokestatic org.jruby.util.log.LoggerFactory.getLogger:(Ljava/lang/Class;)Lorg/jruby/util/log/Logger;
putstatic org.jruby.util.io.FilenoUtil.LOG:Lorg/jruby/util/log/Logger;
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>(jnr.posix.POSIX);
descriptor: (Ljnr/posix/POSIX;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 0: new java.lang.Error
dup
ldc "Unresolved compilation problems: \n\tThe import jnr.ffi.LibraryLoader cannot be resolved\n\tThe import jnr.ffi.Pointer cannot be resolved\n\tLibraryLoader cannot be resolved\n\tThe method toPointer() from the type HANDLE refers to the missing type Pointer\n\tPointer cannot be resolved to a type\n"
invokespecial java.lang.Error.<init>:(Ljava/lang/String;)V
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/util/io/FilenoUtil;
MethodParameters:
Name Flags
posix
public static java.io.FileDescriptor getDescriptorFromChannel(java.nio.channels.Channel);
descriptor: (Ljava/nio/channels/Channel;)Ljava/io/FileDescriptor;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: getstatic org.jruby.util.io.FilenoUtil$ReflectiveAccess.SEL_CH_IMPL_GET_FD_HANDLE:Ljava/lang/invoke/MethodHandle;
ifnull 5
getstatic org.jruby.util.io.FilenoUtil$ReflectiveAccess.SEL_CH_IMPL:Ljava/util/function/Predicate;
aload 0
invokeinterface java.util.function.Predicate.test:(Ljava/lang/Object;)Z
ifeq 5
1: getstatic org.jruby.util.io.FilenoUtil$ReflectiveAccess.SEL_CH_IMPL_GET_FD:Ljava/util/function/Function;
aload 0
invokeinterface java.util.function.Function.apply:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.io.FileDescriptor
2: areturn
3: StackMap locals:
StackMap stack: java.lang.Exception
pop
4: goto 21
StackMap locals:
StackMap stack:
5: getstatic org.jruby.util.io.FilenoUtil$ReflectiveAccess.FILE_CHANNEL_IMPL_GET_FD_HANDLE:Ljava/lang/invoke/MethodHandle;
ifnull 10
getstatic org.jruby.util.io.FilenoUtil$ReflectiveAccess.FILE_CHANNEL_IMPL:Ljava/util/function/Predicate;
aload 0
invokeinterface java.util.function.Predicate.test:(Ljava/lang/Object;)Z
ifeq 10
6: getstatic org.jruby.util.io.FilenoUtil$ReflectiveAccess.FILE_CHANNEL_IMPL_GET_FD:Ljava/util/function/Function;
aload 0
invokeinterface java.util.function.Function.apply:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.io.FileDescriptor
7: areturn
8: StackMap locals:
StackMap stack: java.lang.Exception
pop
9: goto 21
StackMap locals:
StackMap stack:
10: getstatic org.jruby.util.io.FilenoUtil$ReflectiveAccess.FILE_DESCRIPTOR_SET_FILENO_HANDLE:Ljava/lang/invoke/MethodHandle;
ifnull 21
11: new java.io.FileDescriptor
dup
invokespecial java.io.FileDescriptor.<init>:()V
astore 1
start local 1 12: aload 0
instanceof jnr.unixsocket.UnixSocketChannel
ifeq 16
13: getstatic org.jruby.util.io.FilenoUtil$ReflectiveAccess.FILE_DESCRIPTOR_SET_FILENO:Ljava/util/function/ObjIntConsumer;
aload 1
aload 0
checkcast jnr.unixsocket.UnixSocketChannel
invokevirtual jnr.unixsocket.UnixSocketChannel.getFD:()I
invokeinterface java.util.function.ObjIntConsumer.accept:(Ljava/lang/Object;I)V
14: aload 1
15: areturn
16: StackMap locals: java.io.FileDescriptor
StackMap stack:
aload 0
instanceof jnr.unixsocket.UnixServerSocketChannel
ifeq 21
17: getstatic org.jruby.util.io.FilenoUtil$ReflectiveAccess.FILE_DESCRIPTOR_SET_FILENO:Ljava/util/function/ObjIntConsumer;
aload 1
aload 0
checkcast jnr.unixsocket.UnixServerSocketChannel
invokevirtual jnr.unixsocket.UnixServerSocketChannel.getFD:()I
invokeinterface java.util.function.ObjIntConsumer.accept:(Ljava/lang/Object;I)V
18: aload 1
19: areturn
20: StackMap locals:
StackMap stack: java.lang.Exception
pop
end local 1 21: StackMap locals:
StackMap stack:
new java.io.FileDescriptor
dup
invokespecial java.io.FileDescriptor.<init>:()V
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 22 0 channel Ljava/nio/channels/Channel;
12 21 1 unixFD Ljava/io/FileDescriptor;
Exception table:
from to target type
1 2 3 Class java.lang.Exception
6 7 8 Class java.lang.Exception
12 15 20 Class java.lang.Exception
16 19 20 Class java.lang.Exception
MethodParameters:
Name Flags
channel
public org.jruby.util.io.ChannelFD getWrapperFromFileno(int);
descriptor: (I)Lorg/jruby/util/io/ChannelFD;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=4, args_size=2
start local 0 start local 1 0: aload 0
getfield org.jruby.util.io.FilenoUtil.filenoMap:Lorg/jruby/util/collections/NonBlockingHashMapLong;
iload 1
i2l
invokevirtual org.jruby.util.collections.NonBlockingHashMapLong.get:(J)Ljava/lang/Object;
checkcast org.jruby.util.io.ChannelFD
astore 2
start local 2 1: aload 2
ifnull 6
aload 2
getfield org.jruby.util.io.ChannelFD.ch:Ljava/nio/channels/Channel;
invokeinterface java.nio.channels.Channel.isOpen:()Z
ifne 6
iload 1
invokestatic org.jruby.util.io.FilenoUtil.isFake:(I)Z
ifne 6
2: aload 0
getfield org.jruby.util.io.FilenoUtil.posix:Ljnr/posix/POSIX;
invokeinterface jnr.posix.POSIX.allocateStat:()Ljnr/posix/FileStat;
astore 3
start local 3 3: aload 0
getfield org.jruby.util.io.FilenoUtil.posix:Ljnr/posix/POSIX;
iload 1
aload 3
invokeinterface jnr.posix.POSIX.fstat:(ILjnr/posix/FileStat;)I
iflt 6
4: aload 0
getfield org.jruby.util.io.FilenoUtil.filenoMap:Lorg/jruby/util/collections/NonBlockingHashMapLong;
iload 1
i2l
invokevirtual org.jruby.util.collections.NonBlockingHashMapLong.remove:(J)Ljava/lang/Object;
pop
5: aconst_null
astore 2
end local 3 6: StackMap locals: org.jruby.util.io.ChannelFD
StackMap stack:
aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/jruby/util/io/FilenoUtil;
0 7 1 fileno I
1 7 2 fd Lorg/jruby/util/io/ChannelFD;
3 6 3 stat Ljnr/posix/FileStat;
MethodParameters:
Name Flags
fileno
public void registerWrapper(int, org.jruby.util.io.ChannelFD);
descriptor: (ILorg/jruby/util/io/ChannelFD;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: iload 1
iconst_m1
if_icmpne 1
return
1: StackMap locals:
StackMap stack:
aload 0
getfield org.jruby.util.io.FilenoUtil.filenoMap:Lorg/jruby/util/collections/NonBlockingHashMapLong;
iload 1
i2l
aload 2
invokevirtual org.jruby.util.collections.NonBlockingHashMapLong.put:(JLjava/lang/Object;)Ljava/lang/Object;
pop
2: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/jruby/util/io/FilenoUtil;
0 3 1 fileno I
0 3 2 wrapper Lorg/jruby/util/io/ChannelFD;
MethodParameters:
Name Flags
fileno
wrapper
public void unregisterWrapper(int);
descriptor: (I)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: iload 1
iconst_m1
if_icmpne 1
return
1: StackMap locals:
StackMap stack:
aload 0
getfield org.jruby.util.io.FilenoUtil.filenoMap:Lorg/jruby/util/collections/NonBlockingHashMapLong;
iload 1
i2l
invokevirtual org.jruby.util.collections.NonBlockingHashMapLong.remove:(J)Ljava/lang/Object;
pop
2: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/jruby/util/io/FilenoUtil;
0 3 1 fileno I
MethodParameters:
Name Flags
fileno
public int getNumberOfWrappers();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jruby.util.io.FilenoUtil.filenoMap:Lorg/jruby/util/collections/NonBlockingHashMapLong;
invokevirtual org.jruby.util.collections.NonBlockingHashMapLong.size:()I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/util/io/FilenoUtil;
public int getNewFileno();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jruby.util.io.FilenoUtil.internalFilenoIndex:Ljava/util/concurrent/atomic/AtomicInteger;
invokevirtual java.util.concurrent.atomic.AtomicInteger.getAndIncrement:()I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/util/io/FilenoUtil;
public static boolean isFake(int);
descriptor: (I)Z
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: iload 0
iflt 1
iload 0
ldc 100000
if_icmpge 1
iconst_0
ireturn
StackMap locals:
StackMap stack:
1: iconst_1
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 fileno I
MethodParameters:
Name Flags
fileno
public static int filenoFrom(java.nio.channels.Channel);
descriptor: (Ljava/nio/channels/Channel;)I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
instanceof jnr.enxio.channels.NativeSelectableChannel
ifeq 2
1: aload 0
checkcast jnr.enxio.channels.NativeSelectableChannel
invokeinterface jnr.enxio.channels.NativeSelectableChannel.getFD:()I
ireturn
2: StackMap locals:
StackMap stack:
aload 0
invokestatic org.jruby.util.io.FilenoUtil.getFilenoUsingReflection:(Ljava/nio/channels/Channel;)I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 channel Ljava/nio/channels/Channel;
MethodParameters:
Name Flags
channel
private static int getFilenoUsingReflection(java.nio.channels.Channel);
descriptor: (Ljava/nio/channels/Channel;)I
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: getstatic org.jruby.util.io.FilenoUtil$ReflectiveAccess.FILE_DESCRIPTOR_GET_FILENO_HANDLE:Ljava/lang/invoke/MethodHandle;
ifnull 2
1: aload 0
invokestatic org.jruby.util.io.FilenoUtil.getDescriptorFromChannel:(Ljava/nio/channels/Channel;)Ljava/io/FileDescriptor;
invokestatic org.jruby.util.io.FilenoUtil.filenoFrom:(Ljava/io/FileDescriptor;)I
ireturn
2: StackMap locals:
StackMap stack:
iconst_m1
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 channel Ljava/nio/channels/Channel;
MethodParameters:
Name Flags
channel
public static int filenoFrom(java.io.FileDescriptor);
descriptor: (Ljava/io/FileDescriptor;)I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual java.io.FileDescriptor.valid:()Z
ifeq 4
1: getstatic org.jruby.util.io.FilenoUtil$ReflectiveAccess.FILE_DESCRIPTOR_GET_FILENO:Ljava/util/function/ToIntFunction;
aload 0
invokeinterface java.util.function.ToIntFunction.applyAsInt:(Ljava/lang/Object;)I
2: ireturn
3: StackMap locals:
StackMap stack: java.lang.Exception
pop
4: StackMap locals:
StackMap stack:
iconst_m1
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 fd Ljava/io/FileDescriptor;
Exception table:
from to target type
1 2 3 Class java.lang.Exception
MethodParameters:
Name Flags
fd
private static jnr.posix.HANDLE handleFrom(java.nio.channels.Channel);
descriptor: (Ljava/nio/channels/Channel;)Ljnr/posix/HANDLE;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
instanceof jnr.enxio.channels.NativeSelectableChannel
ifeq 2
1: aload 0
checkcast jnr.enxio.channels.NativeSelectableChannel
invokeinterface jnr.enxio.channels.NativeSelectableChannel.getFD:()I
i2l
invokestatic jnr.posix.HANDLE.valueOf:(J)Ljnr/posix/HANDLE;
areturn
2: StackMap locals:
StackMap stack:
aload 0
invokestatic org.jruby.util.io.FilenoUtil.getHandleUsingReflection:(Ljava/nio/channels/Channel;)Ljnr/posix/HANDLE;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 channel Ljava/nio/channels/Channel;
MethodParameters:
Name Flags
channel
private static jnr.posix.HANDLE getHandleUsingReflection(java.nio.channels.Channel);
descriptor: (Ljava/nio/channels/Channel;)Ljnr/posix/HANDLE;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: getstatic org.jruby.util.io.FilenoUtil$ReflectiveAccess.FILE_DESCRIPTOR_GET_FILENO_HANDLE:Ljava/lang/invoke/MethodHandle;
ifnull 2
1: aload 0
invokestatic org.jruby.util.io.FilenoUtil.getDescriptorFromChannel:(Ljava/nio/channels/Channel;)Ljava/io/FileDescriptor;
invokestatic jnr.posix.JavaLibCHelper.gethandle:(Ljava/io/FileDescriptor;)Ljnr/posix/HANDLE;
areturn
2: StackMap locals:
StackMap stack:
ldc -1
invokestatic jnr.posix.HANDLE.valueOf:(J)Ljnr/posix/HANDLE;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 channel Ljava/nio/channels/Channel;
MethodParameters:
Name Flags
channel
public int filenoFromHandleIn(java.nio.channels.Channel, int);
descriptor: (Ljava/nio/channels/Channel;I)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=3
start local 0 0: new java.lang.Error
dup
ldc "Unresolved compilation problem: \n\tThe method toPointer() from the type HANDLE refers to the missing type Pointer\n"
invokespecial java.lang.Error.<init>:(Ljava/lang/String;)V
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/util/io/FilenoUtil;
MethodParameters:
Name Flags
channel
flags
public int closeFilenoHandle(int);
descriptor: (I)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: iload 1
iconst_m1
if_icmpeq 2
1: aload 0
getfield org.jruby.util.io.FilenoUtil.winc:Lorg/jruby/util/io/FilenoUtil$WinC;
iload 1
invokeinterface org.jruby.util.io.FilenoUtil$WinC._close:(I)I
ireturn
2: StackMap locals:
StackMap stack:
iconst_m1
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/jruby/util/io/FilenoUtil;
0 3 1 fd I
MethodParameters:
Name Flags
fd
}
SourceFile: "FilenoUtil.java"
NestMembers:
org.jruby.util.io.FilenoUtil$ReflectiveAccess org.jruby.util.io.FilenoUtil$WinC
InnerClasses:
private ReflectiveAccess = org.jruby.util.io.FilenoUtil$ReflectiveAccess of org.jruby.util.io.FilenoUtil
public abstract WinC = org.jruby.util.io.FilenoUtil$WinC of org.jruby.util.io.FilenoUtil