public class com.sun.tools.sjavac.server.PortFile
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: com.sun.tools.sjavac.server.PortFile
super_class: java.lang.Object
{
private static final int magicNr;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 4468
private java.lang.String filename;
descriptor: Ljava/lang/String;
flags: (0x0002) ACC_PRIVATE
private java.io.File file;
descriptor: Ljava/io/File;
flags: (0x0002) ACC_PRIVATE
private java.io.File stopFile;
descriptor: Ljava/io/File;
flags: (0x0002) ACC_PRIVATE
private java.io.RandomAccessFile rwfile;
descriptor: Ljava/io/RandomAccessFile;
flags: (0x0002) ACC_PRIVATE
private java.nio.channels.FileChannel channel;
descriptor: Ljava/nio/channels/FileChannel;
flags: (0x0002) ACC_PRIVATE
private java.nio.channels.FileLock lock;
descriptor: Ljava/nio/channels/FileLock;
flags: (0x0002) ACC_PRIVATE
private java.util.concurrent.Semaphore lockSem;
descriptor: Ljava/util/concurrent/Semaphore;
flags: (0x0002) ACC_PRIVATE
private boolean containsPortInfo;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
private int serverPort;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private long serverCookie;
descriptor: J
flags: (0x0002) ACC_PRIVATE
private int myServerPort;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private long myServerCookie;
descriptor: J
flags: (0x0002) ACC_PRIVATE
public void <init>(java.lang.String);
descriptor: (Ljava/lang/String;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new java.util.concurrent.Semaphore
dup
iconst_1
invokespecial java.util.concurrent.Semaphore.<init>:(I)V
putfield com.sun.tools.sjavac.server.PortFile.lockSem:Ljava/util/concurrent/Semaphore;
2: aload 0
aload 1
putfield com.sun.tools.sjavac.server.PortFile.filename:Ljava/lang/String;
3: aload 0
new java.io.File
dup
aload 0
getfield com.sun.tools.sjavac.server.PortFile.filename:Ljava/lang/String;
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
putfield com.sun.tools.sjavac.server.PortFile.file:Ljava/io/File;
4: aload 0
new java.io.File
dup
new java.lang.StringBuilder
dup
aload 0
getfield com.sun.tools.sjavac.server.PortFile.filename:Ljava/lang/String;
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc ".stop"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
putfield com.sun.tools.sjavac.server.PortFile.stopFile:Ljava/io/File;
5: aload 0
iconst_0
putfield com.sun.tools.sjavac.server.PortFile.containsPortInfo:Z
6: aload 0
aconst_null
putfield com.sun.tools.sjavac.server.PortFile.lock:Ljava/nio/channels/FileLock;
7: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lcom/sun/tools/sjavac/server/PortFile;
0 8 1 fn Ljava/lang/String;
MethodParameters:
Name Flags
fn
private void initializeChannel();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=2, args_size=1
start local 0 0: aload 0
new java.io.RandomAccessFile
dup
aload 0
getfield com.sun.tools.sjavac.server.PortFile.file:Ljava/io/File;
ldc "rw"
invokespecial java.io.RandomAccessFile.<init>:(Ljava/io/File;Ljava/lang/String;)V
putfield com.sun.tools.sjavac.server.PortFile.rwfile:Ljava/io/RandomAccessFile;
1: goto 4
StackMap locals:
StackMap stack: java.io.FileNotFoundException
2: astore 1
start local 1 3: new com.sun.tools.sjavac.client.PortFileInaccessibleException
dup
aload 1
invokespecial com.sun.tools.sjavac.client.PortFileInaccessibleException.<init>:(Ljava/lang/Throwable;)V
athrow
end local 1 4: StackMap locals:
StackMap stack:
aload 0
aload 0
getfield com.sun.tools.sjavac.server.PortFile.rwfile:Ljava/io/RandomAccessFile;
invokevirtual java.io.RandomAccessFile.getChannel:()Ljava/nio/channels/FileChannel;
putfield com.sun.tools.sjavac.server.PortFile.channel:Ljava/nio/channels/FileChannel;
5: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/sun/tools/sjavac/server/PortFile;
3 4 1 e Ljava/io/FileNotFoundException;
Exception table:
from to target type
0 1 2 Class java.io.FileNotFoundException
Exceptions:
throws com.sun.tools.sjavac.client.PortFileInaccessibleException
public void lock();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield com.sun.tools.sjavac.server.PortFile.channel:Ljava/nio/channels/FileChannel;
ifnonnull 2
1: aload 0
invokevirtual com.sun.tools.sjavac.server.PortFile.initializeChannel:()V
2: StackMap locals:
StackMap stack:
aload 0
getfield com.sun.tools.sjavac.server.PortFile.lockSem:Ljava/util/concurrent/Semaphore;
invokevirtual java.util.concurrent.Semaphore.acquire:()V
3: aload 0
aload 0
getfield com.sun.tools.sjavac.server.PortFile.channel:Ljava/nio/channels/FileChannel;
invokevirtual java.nio.channels.FileChannel.lock:()Ljava/nio/channels/FileLock;
putfield com.sun.tools.sjavac.server.PortFile.lock:Ljava/nio/channels/FileLock;
4: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lcom/sun/tools/sjavac/server/PortFile;
Exceptions:
throws java.io.IOException, java.lang.InterruptedException
public void getValues();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=2, args_size=1
start local 0 0: aload 0
iconst_0
putfield com.sun.tools.sjavac.server.PortFile.containsPortInfo:Z
1: aload 0
getfield com.sun.tools.sjavac.server.PortFile.lock:Ljava/nio/channels/FileLock;
ifnonnull 3
2: return
3: StackMap locals:
StackMap stack:
aload 0
getfield com.sun.tools.sjavac.server.PortFile.rwfile:Ljava/io/RandomAccessFile;
invokevirtual java.io.RandomAccessFile.length:()J
lconst_0
lcmp
ifle 15
4: aload 0
getfield com.sun.tools.sjavac.server.PortFile.rwfile:Ljava/io/RandomAccessFile;
lconst_0
invokevirtual java.io.RandomAccessFile.seek:(J)V
5: aload 0
getfield com.sun.tools.sjavac.server.PortFile.rwfile:Ljava/io/RandomAccessFile;
invokevirtual java.io.RandomAccessFile.readInt:()I
istore 1
start local 1 6: aload 0
aload 0
getfield com.sun.tools.sjavac.server.PortFile.rwfile:Ljava/io/RandomAccessFile;
invokevirtual java.io.RandomAccessFile.readInt:()I
putfield com.sun.tools.sjavac.server.PortFile.serverPort:I
7: aload 0
aload 0
getfield com.sun.tools.sjavac.server.PortFile.rwfile:Ljava/io/RandomAccessFile;
invokevirtual java.io.RandomAccessFile.readLong:()J
putfield com.sun.tools.sjavac.server.PortFile.serverCookie:J
8: iload 1
sipush 4468
if_icmpne 11
9: aload 0
iconst_1
putfield com.sun.tools.sjavac.server.PortFile.containsPortInfo:Z
10: goto 15
11: StackMap locals: int
StackMap stack:
aload 0
iconst_0
putfield com.sun.tools.sjavac.server.PortFile.containsPortInfo:Z
end local 1 12: goto 15
StackMap locals: com.sun.tools.sjavac.server.PortFile
StackMap stack: java.io.IOException
13: pop
14: aload 0
iconst_0
putfield com.sun.tools.sjavac.server.PortFile.containsPortInfo:Z
15: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 this Lcom/sun/tools/sjavac/server/PortFile;
6 12 1 nr I
Exception table:
from to target type
3 12 13 Class java.io.IOException
public boolean containsPortInfo();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.sun.tools.sjavac.server.PortFile.containsPortInfo:Z
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/sun/tools/sjavac/server/PortFile;
public int getPort();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.sun.tools.sjavac.server.PortFile.containsPortInfo:Z
invokestatic com.sun.tools.javac.util.Assert.check:(Z)V
1: aload 0
getfield com.sun.tools.sjavac.server.PortFile.serverPort:I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/sun/tools/sjavac/server/PortFile;
public long getCookie();
descriptor: ()J
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield com.sun.tools.sjavac.server.PortFile.containsPortInfo:Z
invokestatic com.sun.tools.javac.util.Assert.check:(Z)V
1: aload 0
getfield com.sun.tools.sjavac.server.PortFile.serverCookie:J
lreturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/sun/tools/sjavac/server/PortFile;
public void setValues(int, long);
descriptor: (IJ)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield com.sun.tools.sjavac.server.PortFile.lock:Ljava/nio/channels/FileLock;
ifnull 1
iconst_1
goto 2
StackMap locals:
StackMap stack:
1: iconst_0
StackMap locals:
StackMap stack: int
2: invokestatic com.sun.tools.javac.util.Assert.check:(Z)V
3: aload 0
getfield com.sun.tools.sjavac.server.PortFile.rwfile:Ljava/io/RandomAccessFile;
lconst_0
invokevirtual java.io.RandomAccessFile.seek:(J)V
4: aload 0
getfield com.sun.tools.sjavac.server.PortFile.rwfile:Ljava/io/RandomAccessFile;
sipush 4468
invokevirtual java.io.RandomAccessFile.writeInt:(I)V
5: aload 0
getfield com.sun.tools.sjavac.server.PortFile.rwfile:Ljava/io/RandomAccessFile;
iload 1
invokevirtual java.io.RandomAccessFile.writeInt:(I)V
6: aload 0
getfield com.sun.tools.sjavac.server.PortFile.rwfile:Ljava/io/RandomAccessFile;
lload 2
invokevirtual java.io.RandomAccessFile.writeLong:(J)V
7: aload 0
iload 1
putfield com.sun.tools.sjavac.server.PortFile.myServerPort:I
8: aload 0
lload 2
putfield com.sun.tools.sjavac.server.PortFile.myServerCookie:J
9: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lcom/sun/tools/sjavac/server/PortFile;
0 10 1 port I
0 10 2 cookie J
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
port
cookie
public void delete();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: aload 0
getfield com.sun.tools.sjavac.server.PortFile.rwfile:Ljava/io/RandomAccessFile;
invokevirtual java.io.RandomAccessFile.close:()V
1: aload 0
getfield com.sun.tools.sjavac.server.PortFile.file:Ljava/io/File;
invokevirtual java.io.File.delete:()Z
pop
2: iconst_0
istore 1
start local 1 3: goto 6
4: StackMap locals: int
StackMap stack:
ldc 1000
invokestatic java.lang.Thread.sleep:(J)V
5: iinc 1 1
StackMap locals:
StackMap stack:
6: iload 1
bipush 10
if_icmpge 7
aload 0
getfield com.sun.tools.sjavac.server.PortFile.file:Ljava/io/File;
invokevirtual java.io.File.exists:()Z
ifne 4
end local 1 7: StackMap locals:
StackMap stack:
aload 0
getfield com.sun.tools.sjavac.server.PortFile.file:Ljava/io/File;
invokevirtual java.io.File.exists:()Z
ifeq 9
8: new java.io.IOException
dup
ldc "Failed to delete file."
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
9: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lcom/sun/tools/sjavac/server/PortFile;
3 7 1 i I
Exceptions:
throws java.io.IOException, java.lang.InterruptedException
public boolean exists();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.sun.tools.sjavac.server.PortFile.file:Ljava/io/File;
invokevirtual java.io.File.exists:()Z
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/sun/tools/sjavac/server/PortFile;
Exceptions:
throws java.io.IOException
public boolean markedForStop();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.sun.tools.sjavac.server.PortFile.stopFile:Ljava/io/File;
invokevirtual java.io.File.exists:()Z
ifeq 5
1: aload 0
getfield com.sun.tools.sjavac.server.PortFile.stopFile:Ljava/io/File;
invokevirtual java.io.File.delete:()Z
pop
2: goto 4
StackMap locals:
StackMap stack: java.lang.Exception
3: pop
4: StackMap locals:
StackMap stack:
iconst_1
ireturn
5: StackMap locals:
StackMap stack:
iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/sun/tools/sjavac/server/PortFile;
Exception table:
from to target type
1 2 3 Class java.lang.Exception
Exceptions:
throws java.io.IOException
public void unlock();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield com.sun.tools.sjavac.server.PortFile.lock:Ljava/nio/channels/FileLock;
ifnonnull 2
1: return
2: StackMap locals:
StackMap stack:
aload 0
getfield com.sun.tools.sjavac.server.PortFile.lock:Ljava/nio/channels/FileLock;
invokevirtual java.nio.channels.FileLock.release:()V
3: aload 0
aconst_null
putfield com.sun.tools.sjavac.server.PortFile.lock:Ljava/nio/channels/FileLock;
4: aload 0
getfield com.sun.tools.sjavac.server.PortFile.lockSem:Ljava/util/concurrent/Semaphore;
invokevirtual java.util.concurrent.Semaphore.release:()V
5: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/sun/tools/sjavac/server/PortFile;
Exceptions:
throws java.io.IOException
public void waitForValidValues();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=5, args_size=1
start local 0 0: invokestatic java.lang.System.currentTimeMillis:()J
lstore 1
start local 1 1: lload 1
aload 0
invokevirtual com.sun.tools.sjavac.server.PortFile.getServerStartupTimeoutSeconds:()J
ldc 1000
lmul
ladd
lstore 3
start local 3 2: StackMap locals: long long
StackMap stack:
ldc "Looking for valid port file values..."
invokestatic com.sun.tools.sjavac.Log.debug:(Ljava/lang/String;)V
3: aload 0
invokevirtual com.sun.tools.sjavac.server.PortFile.exists:()Z
ifeq 7
4: aload 0
invokevirtual com.sun.tools.sjavac.server.PortFile.lock:()V
5: aload 0
invokevirtual com.sun.tools.sjavac.server.PortFile.getValues:()V
6: aload 0
invokevirtual com.sun.tools.sjavac.server.PortFile.unlock:()V
7: StackMap locals:
StackMap stack:
aload 0
getfield com.sun.tools.sjavac.server.PortFile.containsPortInfo:Z
ifeq 10
8: new java.lang.StringBuilder
dup
ldc "Valid port file values found after "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
invokestatic java.lang.System.currentTimeMillis:()J
lload 1
lsub
invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
ldc " ms"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokestatic com.sun.tools.sjavac.Log.debug:(Ljava/lang/String;)V
9: return
10: StackMap locals:
StackMap stack:
invokestatic java.lang.System.currentTimeMillis:()J
lload 3
lcmp
ifle 12
11: goto 14
12: StackMap locals:
StackMap stack:
ldc 500
invokestatic java.lang.Thread.sleep:(J)V
13: goto 2
14: StackMap locals:
StackMap stack:
new java.io.IOException
dup
new java.lang.StringBuilder
dup
ldc "No port file values materialized. Giving up after "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
15: invokestatic java.lang.System.currentTimeMillis:()J
lload 1
lsub
invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
ldc " ms"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
16: invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 17 0 this Lcom/sun/tools/sjavac/server/PortFile;
1 17 1 startTime J
2 17 3 timeout J
Exceptions:
throws java.io.IOException, java.lang.InterruptedException
public boolean stillMyValues();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=1, args_size=1
start local 0 0: StackMap locals:
StackMap stack:
aload 0
invokevirtual com.sun.tools.sjavac.server.PortFile.lock:()V
1: aload 0
invokevirtual com.sun.tools.sjavac.server.PortFile.getValues:()V
2: aload 0
invokevirtual com.sun.tools.sjavac.server.PortFile.unlock:()V
3: aload 0
getfield com.sun.tools.sjavac.server.PortFile.containsPortInfo:Z
ifeq 8
4: aload 0
getfield com.sun.tools.sjavac.server.PortFile.serverPort:I
aload 0
getfield com.sun.tools.sjavac.server.PortFile.myServerPort:I
if_icmpne 7
5: aload 0
getfield com.sun.tools.sjavac.server.PortFile.serverCookie:J
aload 0
getfield com.sun.tools.sjavac.server.PortFile.myServerCookie:J
lcmp
ifne 7
6: iconst_1
ireturn
7: StackMap locals:
StackMap stack:
iconst_0
ireturn
8: StackMap locals:
StackMap stack:
iconst_0
ireturn
9: StackMap locals:
StackMap stack: java.nio.channels.FileLockInterruptionException
pop
10: goto 0
11: StackMap locals:
StackMap stack: java.nio.channels.ClosedChannelException
pop
12: iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Lcom/sun/tools/sjavac/server/PortFile;
Exception table:
from to target type
0 6 9 Class java.nio.channels.FileLockInterruptionException
0 6 11 Class java.nio.channels.ClosedChannelException
Exceptions:
throws java.io.IOException, java.io.FileNotFoundException, java.lang.InterruptedException
public java.lang.String getFilename();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.sun.tools.sjavac.server.PortFile.filename:Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/sun/tools/sjavac/server/PortFile;
private long getServerStartupTimeoutSeconds();
descriptor: ()J
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=2, args_size=1
start local 0 0: ldc "serverStartupTimeout"
invokestatic java.lang.System.getProperty:(Ljava/lang/String;)Ljava/lang/String;
astore 1
start local 1 1: aload 1
ifnull 5
2: aload 1
invokestatic java.lang.Integer.parseInt:(Ljava/lang/String;)I
i2l
3: lreturn
4: StackMap locals: com.sun.tools.sjavac.server.PortFile java.lang.String
StackMap stack: java.lang.NumberFormatException
pop
5: StackMap locals:
StackMap stack:
ldc 60
lreturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/sun/tools/sjavac/server/PortFile;
1 6 1 str Ljava/lang/String;
Exception table:
from to target type
2 3 4 Class java.lang.NumberFormatException
}
SourceFile: "PortFile.java"