class com.sun.glass.ui.monocle.Udev implements java.lang.Runnable
minor version: 0
major version: 59
flags: flags: (0x0020) ACC_SUPER
this_class: com.sun.glass.ui.monocle.Udev
super_class: java.lang.Object
{
private static com.sun.glass.ui.monocle.Udev instance;
descriptor: Lcom/sun/glass/ui/monocle/Udev;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
private long fd;
descriptor: J
flags: (0x0002) ACC_PRIVATE
private java.nio.ByteBuffer buffer;
descriptor: Ljava/nio/ByteBuffer;
flags: (0x0002) ACC_PRIVATE
private java.lang.Thread thread;
descriptor: Ljava/lang/Thread;
flags: (0x0002) ACC_PRIVATE
private com.sun.glass.ui.monocle.UdevListener[] listeners;
descriptor: [Lcom/sun/glass/ui/monocle/UdevListener;
flags: (0x0002) ACC_PRIVATE
static synchronized com.sun.glass.ui.monocle.Udev getInstance();
descriptor: ()Lcom/sun/glass/ui/monocle/Udev;
flags: (0x0028) ACC_STATIC, ACC_SYNCHRONIZED
Code:
stack=2, locals=1, args_size=0
0: getstatic com.sun.glass.ui.monocle.Udev.instance:Lcom/sun/glass/ui/monocle/Udev;
ifnonnull 6
1: new com.sun.glass.ui.monocle.Udev
dup
invokespecial com.sun.glass.ui.monocle.Udev.<init>:()V
putstatic com.sun.glass.ui.monocle.Udev.instance:Lcom/sun/glass/ui/monocle/Udev;
2: goto 6
StackMap locals:
StackMap stack: java.io.IOException
3: astore 0
start local 0 4: getstatic java.lang.System.err:Ljava/io/PrintStream;
ldc "Udev: failed to open connection"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
5: aload 0
invokevirtual java.io.IOException.printStackTrace:()V
end local 0 6: StackMap locals:
StackMap stack:
getstatic com.sun.glass.ui.monocle.Udev.instance:Lcom/sun/glass/ui/monocle/Udev;
areturn
LocalVariableTable:
Start End Slot Name Signature
4 6 0 e Ljava/io/IOException;
Exception table:
from to target type
1 2 3 Class java.io.IOException
private void <init>();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
aload 0
invokevirtual com.sun.glass.ui.monocle.Udev._open:()J
putfield com.sun.glass.ui.monocle.Udev.fd:J
2: aload 0
sipush 4096
invokestatic java.nio.ByteBuffer.allocateDirect:(I)Ljava/nio/ByteBuffer;
putfield com.sun.glass.ui.monocle.Udev.buffer:Ljava/nio/ByteBuffer;
3: aload 0
getfield com.sun.glass.ui.monocle.Udev.buffer:Ljava/nio/ByteBuffer;
invokestatic java.nio.ByteOrder.nativeOrder:()Ljava/nio/ByteOrder;
invokevirtual java.nio.ByteBuffer.order:(Ljava/nio/ByteOrder;)Ljava/nio/ByteBuffer;
pop
4: aload 0
new java.lang.Thread
dup
aload 0
ldc "udev monitor"
invokespecial java.lang.Thread.<init>:(Ljava/lang/Runnable;Ljava/lang/String;)V
putfield com.sun.glass.ui.monocle.Udev.thread:Ljava/lang/Thread;
5: aload 0
getfield com.sun.glass.ui.monocle.Udev.thread:Ljava/lang/Thread;
iconst_1
invokevirtual java.lang.Thread.setDaemon:(Z)V
6: aload 0
getfield com.sun.glass.ui.monocle.Udev.thread:Ljava/lang/Thread;
invokevirtual java.lang.Thread.start:()V
7: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lcom/sun/glass/ui/monocle/Udev;
Exceptions:
throws java.io.IOException
synchronized void addListener(com.sun.glass.ui.monocle.UdevListener);
descriptor: (Lcom/sun/glass/ui/monocle/UdevListener;)V
flags: (0x0020) ACC_SYNCHRONIZED
Code:
stack=5, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield com.sun.glass.ui.monocle.Udev.listeners:[Lcom/sun/glass/ui/monocle/UdevListener;
ifnonnull 3
1: aload 0
iconst_1
anewarray com.sun.glass.ui.monocle.UdevListener
dup
iconst_0
aload 1
aastore
putfield com.sun.glass.ui.monocle.Udev.listeners:[Lcom/sun/glass/ui/monocle/UdevListener;
2: goto 5
3: StackMap locals:
StackMap stack:
aload 0
aload 0
getfield com.sun.glass.ui.monocle.Udev.listeners:[Lcom/sun/glass/ui/monocle/UdevListener;
aload 0
getfield com.sun.glass.ui.monocle.Udev.listeners:[Lcom/sun/glass/ui/monocle/UdevListener;
arraylength
iconst_1
iadd
invokestatic java.util.Arrays.copyOf:([Ljava/lang/Object;I)[Ljava/lang/Object;
checkcast com.sun.glass.ui.monocle.UdevListener[]
putfield com.sun.glass.ui.monocle.Udev.listeners:[Lcom/sun/glass/ui/monocle/UdevListener;
4: aload 0
getfield com.sun.glass.ui.monocle.Udev.listeners:[Lcom/sun/glass/ui/monocle/UdevListener;
aload 0
getfield com.sun.glass.ui.monocle.Udev.listeners:[Lcom/sun/glass/ui/monocle/UdevListener;
arraylength
iconst_1
isub
aload 1
aastore
5: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/sun/glass/ui/monocle/Udev;
0 6 1 listener Lcom/sun/glass/ui/monocle/UdevListener;
MethodParameters:
Name Flags
listener
private native long _open();
descriptor: ()J
flags: (0x0102) ACC_PRIVATE, ACC_NATIVE
Exceptions:
throws java.io.IOException
private native int _readEvent(long, java.nio.ByteBuffer);
descriptor: (JLjava/nio/ByteBuffer;)I
flags: (0x0102) ACC_PRIVATE, ACC_NATIVE
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
fd
buffer
private native void _close(long);
descriptor: (J)V
flags: (0x0102) ACC_PRIVATE, ACC_NATIVE
MethodParameters:
Name Flags
fd
private native int _getPropertiesOffset(java.nio.ByteBuffer);
descriptor: (Ljava/nio/ByteBuffer;)I
flags: (0x0102) ACC_PRIVATE, ACC_NATIVE
MethodParameters:
Name Flags
buffer
private native int _getPropertiesLength(java.nio.ByteBuffer);
descriptor: (Ljava/nio/ByteBuffer;)I
flags: (0x0102) ACC_PRIVATE, ACC_NATIVE
MethodParameters:
Name Flags
buffer
public void run();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=3, args_size=1
start local 0 0: invokestatic com.sun.glass.ui.monocle.NativePlatformFactory.getNativePlatform:()Lcom/sun/glass/ui/monocle/NativePlatform;
invokevirtual com.sun.glass.ui.monocle.NativePlatform.getRunnableProcessor:()Lcom/sun/glass/ui/monocle/RunnableProcessor;
1: astore 1
start local 1 2: StackMap locals: com.sun.glass.ui.monocle.RunnableProcessor
StackMap stack:
aload 0
invokevirtual com.sun.glass.ui.monocle.Udev.readEvent:()Ljava/util/Map;
astore 2
start local 2 3: aload 1
new com.sun.glass.ui.monocle.Udev$1
dup
aload 0
aload 2
invokespecial com.sun.glass.ui.monocle.Udev$1.<init>:(Lcom/sun/glass/ui/monocle/Udev;Ljava/util/Map;)V
invokevirtual com.sun.glass.ui.monocle.RunnableProcessor.invokeLater:(Ljava/lang/Runnable;)V
end local 2 4: goto 2
end local 1 5: StackMap locals: com.sun.glass.ui.monocle.Udev
StackMap stack: java.io.IOException
astore 1
start local 1 6: aload 0
getfield com.sun.glass.ui.monocle.Udev.thread:Ljava/lang/Thread;
invokevirtual java.lang.Thread.isInterrupted:()Z
ifne 10
7: getstatic java.lang.System.err:Ljava/io/PrintStream;
ldc "Exception in udev thread:"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
8: aload 1
invokevirtual java.io.IOException.printStackTrace:()V
9: aload 0
invokevirtual com.sun.glass.ui.monocle.Udev.close:()V
end local 1 10: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lcom/sun/glass/ui/monocle/Udev;
2 5 1 runnableProcessor Lcom/sun/glass/ui/monocle/RunnableProcessor;
3 4 2 event Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;
6 10 1 e Ljava/io/IOException;
Exception table:
from to target type
0 5 5 Class java.io.IOException
private java.util.Map<java.lang.String, java.lang.String> readEvent();
descriptor: ()Ljava/util/Map;
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=12, args_size=1
start local 0 0: new java.util.HashMap
dup
invokespecial java.util.HashMap.<init>:()V
astore 1
start local 1 1: aload 0
dup
astore 3
monitorenter
2: aload 0
getfield com.sun.glass.ui.monocle.Udev.buffer:Ljava/nio/ByteBuffer;
astore 2
start local 2 3: aload 2
ifnonnull 6
4: aload 1
aload 3
monitorexit
5: areturn
6: StackMap locals: java.util.Map java.nio.ByteBuffer com.sun.glass.ui.monocle.Udev
StackMap stack:
aload 3
monitorexit
7: goto 10
end local 2 StackMap locals: com.sun.glass.ui.monocle.Udev java.util.Map top com.sun.glass.ui.monocle.Udev
StackMap stack: java.lang.Throwable
8: aload 3
monitorexit
9: athrow
start local 2 10: StackMap locals: com.sun.glass.ui.monocle.Udev java.util.Map java.nio.ByteBuffer
StackMap stack:
aload 0
aload 0
getfield com.sun.glass.ui.monocle.Udev.fd:J
aload 2
invokevirtual com.sun.glass.ui.monocle.Udev._readEvent:(JLjava/nio/ByteBuffer;)I
istore 3
start local 3 11: aload 0
dup
astore 4
monitorenter
12: aload 0
getfield com.sun.glass.ui.monocle.Udev.buffer:Ljava/nio/ByteBuffer;
ifnonnull 15
13: aload 1
aload 4
monitorexit
14: areturn
15: StackMap locals: int com.sun.glass.ui.monocle.Udev
StackMap stack:
aload 0
aload 0
getfield com.sun.glass.ui.monocle.Udev.buffer:Ljava/nio/ByteBuffer;
invokevirtual com.sun.glass.ui.monocle.Udev._getPropertiesOffset:(Ljava/nio/ByteBuffer;)I
istore 5
start local 5 16: aload 0
aload 0
getfield com.sun.glass.ui.monocle.Udev.buffer:Ljava/nio/ByteBuffer;
invokevirtual com.sun.glass.ui.monocle.Udev._getPropertiesLength:(Ljava/nio/ByteBuffer;)I
istore 6
start local 6 17: iload 5
iload 6
iadd
istore 7
start local 7 18: iload 3
iload 7
if_icmpge 20
19: new java.io.IOException
dup
ldc "Mismatched property segment length"
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
20: StackMap locals: int int int
StackMap stack:
aload 0
getfield com.sun.glass.ui.monocle.Udev.buffer:Ljava/nio/ByteBuffer;
iload 5
invokevirtual java.nio.ByteBuffer.position:(I)Ljava/nio/Buffer;
pop
21: new java.lang.StringBuffer
dup
invokespecial java.lang.StringBuffer.<init>:()V
astore 8
start local 8 22: new java.lang.StringBuffer
dup
invokespecial java.lang.StringBuffer.<init>:()V
astore 9
start local 9 23: goto 43
24: StackMap locals: java.lang.StringBuffer java.lang.StringBuffer
StackMap stack:
aload 8
iconst_0
invokevirtual java.lang.StringBuffer.setLength:(I)V
25: aload 9
iconst_0
invokevirtual java.lang.StringBuffer.setLength:(I)V
26: iconst_0
istore 10
start local 10 27: goto 35
28: StackMap locals: int
StackMap stack:
aload 0
getfield com.sun.glass.ui.monocle.Udev.buffer:Ljava/nio/ByteBuffer;
invokevirtual java.nio.ByteBuffer.get:()B
i2c
istore 11
start local 11 29: iload 11
lookupswitch { // 2
0: 30
61: 32
default: 34
}
30: StackMap locals: int
StackMap stack:
aload 1
aload 8
invokevirtual java.lang.StringBuffer.toString:()Ljava/lang/String;
ldc ""
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
31: goto 43
32: StackMap locals:
StackMap stack:
iconst_1
istore 10
33: goto 35
34: StackMap locals:
StackMap stack:
aload 8
iload 11
invokevirtual java.lang.StringBuffer.append:(C)Ljava/lang/StringBuffer;
pop
end local 11 35: StackMap locals:
StackMap stack:
aload 0
getfield com.sun.glass.ui.monocle.Udev.buffer:Ljava/nio/ByteBuffer;
invokevirtual java.nio.ByteBuffer.position:()I
iload 3
if_icmpge 42
iload 10
ifeq 28
36: goto 42
37: StackMap locals:
StackMap stack:
aload 0
getfield com.sun.glass.ui.monocle.Udev.buffer:Ljava/nio/ByteBuffer;
invokevirtual java.nio.ByteBuffer.get:()B
i2c
istore 11
start local 11 38: iload 11
tableswitch { // 0 - 0
0: 39
default: 41
}
39: StackMap locals: int
StackMap stack:
aload 1
aload 8
invokevirtual java.lang.StringBuffer.toString:()Ljava/lang/String;
aload 9
invokevirtual java.lang.StringBuffer.toString:()Ljava/lang/String;
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
40: goto 43
41: StackMap locals:
StackMap stack:
aload 9
iload 11
invokevirtual java.lang.StringBuffer.append:(C)Ljava/lang/StringBuffer;
pop
end local 11 42: StackMap locals:
StackMap stack:
aload 0
getfield com.sun.glass.ui.monocle.Udev.buffer:Ljava/nio/ByteBuffer;
invokevirtual java.nio.ByteBuffer.position:()I
iload 7
if_icmplt 37
end local 10 43: StackMap locals:
StackMap stack:
aload 0
getfield com.sun.glass.ui.monocle.Udev.buffer:Ljava/nio/ByteBuffer;
invokevirtual java.nio.ByteBuffer.position:()I
iload 7
if_icmplt 24
44: aload 0
getfield com.sun.glass.ui.monocle.Udev.buffer:Ljava/nio/ByteBuffer;
invokevirtual java.nio.ByteBuffer.clear:()Ljava/nio/Buffer;
pop
end local 9 end local 8 end local 7 end local 6 end local 5 45: aload 4
monitorexit
46: goto 49
StackMap locals: com.sun.glass.ui.monocle.Udev java.util.Map java.nio.ByteBuffer int com.sun.glass.ui.monocle.Udev
StackMap stack: java.lang.Throwable
47: aload 4
monitorexit
48: athrow
49: StackMap locals:
StackMap stack:
aload 1
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 50 0 this Lcom/sun/glass/ui/monocle/Udev;
1 50 1 map Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;
3 8 2 b Ljava/nio/ByteBuffer;
10 50 2 b Ljava/nio/ByteBuffer;
11 50 3 length I
16 45 5 propertiesOffset I
17 45 6 propertiesLength I
18 45 7 propertiesEnd I
22 45 8 key Ljava/lang/StringBuffer;
23 45 9 value Ljava/lang/StringBuffer;
27 43 10 readKey Z
29 35 11 ch C
38 42 11 ch C
Exception table:
from to target type
2 5 8 any
6 7 8 any
8 9 8 any
12 14 47 any
15 46 47 any
47 48 47 any
Exceptions:
throws java.io.IOException
Signature: ()Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;
synchronized void close();
descriptor: ()V
flags: (0x0020) ACC_SYNCHRONIZED
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
getfield com.sun.glass.ui.monocle.Udev.thread:Ljava/lang/Thread;
invokevirtual java.lang.Thread.interrupt:()V
1: aload 0
aload 0
getfield com.sun.glass.ui.monocle.Udev.fd:J
invokevirtual com.sun.glass.ui.monocle.Udev._close:(J)V
2: aload 0
lconst_0
putfield com.sun.glass.ui.monocle.Udev.fd:J
3: aload 0
aconst_null
putfield com.sun.glass.ui.monocle.Udev.buffer:Ljava/nio/ByteBuffer;
4: aload 0
aconst_null
putfield com.sun.glass.ui.monocle.Udev.thread:Ljava/lang/Thread;
5: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/sun/glass/ui/monocle/Udev;
}
SourceFile: "Udev.java"
NestMembers:
com.sun.glass.ui.monocle.Udev$1
InnerClasses:
com.sun.glass.ui.monocle.Udev$1