public class jdk.internal.jline.console.completer.FileNameCompleter implements jdk.internal.jline.console.completer.Completer
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: jdk.internal.jline.console.completer.FileNameCompleter
super_class: java.lang.Object
{
private static final boolean OS_IS_WINDOWS;
descriptor: Z
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=1, args_size=0
0: invokestatic jdk.internal.jline.internal.Configuration.getOsName:()Ljava/lang/String;
astore 0
start local 0 1: aload 0
ldc "windows"
invokevirtual java.lang.String.contains:(Ljava/lang/CharSequence;)Z
putstatic jdk.internal.jline.console.completer.FileNameCompleter.OS_IS_WINDOWS:Z
end local 0 2: return
LocalVariableTable:
Start End Slot Name Signature
1 2 0 os Ljava/lang/String;
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/internal/jline/console/completer/FileNameCompleter;
public int complete(java.lang.String, int, java.util.List<java.lang.CharSequence>);
descriptor: (Ljava/lang/String;ILjava/util/List;)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=9, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 3
invokestatic jdk.internal.jline.internal.Preconditions.checkNotNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
1: aload 1
ifnonnull 3
2: ldc ""
astore 1
3: StackMap locals:
StackMap stack:
getstatic jdk.internal.jline.console.completer.FileNameCompleter.OS_IS_WINDOWS:Z
ifeq 5
4: aload 1
bipush 47
bipush 92
invokevirtual java.lang.String.replace:(CC)Ljava/lang/String;
astore 1
5: StackMap locals:
StackMap stack:
aload 1
astore 4
start local 4 6: aload 0
invokevirtual jdk.internal.jline.console.completer.FileNameCompleter.getUserHome:()Ljava/io/File;
astore 5
start local 5 7: aload 4
new java.lang.StringBuilder
dup
ldc "~"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
invokevirtual jdk.internal.jline.console.completer.FileNameCompleter.separator:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifeq 10
8: new java.lang.StringBuilder
dup
aload 5
invokevirtual java.io.File.getPath:()Ljava/lang/String;
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 4
iconst_1
invokevirtual java.lang.String.substring:(I)Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 4
9: goto 16
10: StackMap locals: java.lang.String java.io.File
StackMap stack:
aload 4
ldc "~"
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifeq 13
11: aload 5
invokevirtual java.io.File.getParentFile:()Ljava/io/File;
invokevirtual java.io.File.getAbsolutePath:()Ljava/lang/String;
astore 4
12: goto 16
13: StackMap locals:
StackMap stack:
new java.io.File
dup
aload 4
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
invokevirtual java.io.File.isAbsolute:()Z
ifne 16
14: aload 0
invokevirtual jdk.internal.jline.console.completer.FileNameCompleter.getUserDir:()Ljava/io/File;
invokevirtual java.io.File.getAbsolutePath:()Ljava/lang/String;
astore 6
start local 6 15: new java.lang.StringBuilder
dup
aload 6
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
invokevirtual jdk.internal.jline.console.completer.FileNameCompleter.separator:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 4
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 4
end local 6 16: StackMap locals:
StackMap stack:
new java.io.File
dup
aload 4
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
astore 6
start local 6 17: aload 4
aload 0
invokevirtual jdk.internal.jline.console.completer.FileNameCompleter.separator:()Ljava/lang/String;
invokevirtual java.lang.String.endsWith:(Ljava/lang/String;)Z
ifeq 20
18: aload 6
astore 7
start local 7 19: goto 21
end local 7 20: StackMap locals: java.io.File
StackMap stack:
aload 6
invokevirtual java.io.File.getParentFile:()Ljava/io/File;
astore 7
start local 7 21: StackMap locals: java.io.File
StackMap stack:
aload 7
ifnonnull 22
iconst_0
anewarray java.io.File
goto 23
StackMap locals:
StackMap stack:
22: aload 7
invokevirtual java.io.File.listFiles:()[Ljava/io/File;
StackMap locals:
StackMap stack: java.io.File[]
23: astore 8
start local 8 24: aload 0
aload 1
aload 4
aload 8
aload 3
invokevirtual jdk.internal.jline.console.completer.FileNameCompleter.matchFiles:(Ljava/lang/String;Ljava/lang/String;[Ljava/io/File;Ljava/util/List;)I
ireturn
end local 8 end local 7 end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 25 0 this Ljdk/internal/jline/console/completer/FileNameCompleter;
0 25 1 buffer Ljava/lang/String;
0 25 2 cursor I
0 25 3 candidates Ljava/util/List<Ljava/lang/CharSequence;>;
6 25 4 translated Ljava/lang/String;
7 25 5 homeDir Ljava/io/File;
15 16 6 cwd Ljava/lang/String;
17 25 6 file Ljava/io/File;
19 20 7 dir Ljava/io/File;
21 25 7 dir Ljava/io/File;
24 25 8 entries [Ljava/io/File;
Signature: (Ljava/lang/String;ILjava/util/List<Ljava/lang/CharSequence;>;)I
MethodParameters:
Name Flags
buffer
cursor final
candidates final
protected java.lang.String separator();
descriptor: ()Ljava/lang/String;
flags: (0x0004) ACC_PROTECTED
Code:
stack=1, locals=1, args_size=1
start local 0 0: getstatic java.io.File.separator:Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/internal/jline/console/completer/FileNameCompleter;
protected java.io.File getUserHome();
descriptor: ()Ljava/io/File;
flags: (0x0004) ACC_PROTECTED
Code:
stack=1, locals=1, args_size=1
start local 0 0: invokestatic jdk.internal.jline.internal.Configuration.getUserHome:()Ljava/io/File;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/internal/jline/console/completer/FileNameCompleter;
protected java.io.File getUserDir();
descriptor: ()Ljava/io/File;
flags: (0x0004) ACC_PROTECTED
Code:
stack=3, locals=1, args_size=1
start local 0 0: new java.io.File
dup
ldc "."
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/internal/jline/console/completer/FileNameCompleter;
protected int matchFiles(java.lang.String, java.lang.String, java.io.File[], java.util.List<java.lang.CharSequence>);
descriptor: (Ljava/lang/String;Ljava/lang/String;[Ljava/io/File;Ljava/util/List;)I
flags: (0x0004) ACC_PROTECTED
Code:
stack=4, locals=11, args_size=5
start local 0 start local 1 start local 2 start local 3 start local 4 0: aload 3
ifnonnull 2
1: iconst_m1
ireturn
2: StackMap locals:
StackMap stack:
iconst_0
istore 5
start local 5 3: aload 3
dup
astore 9
arraylength
istore 8
iconst_0
istore 7
goto 8
StackMap locals: jdk.internal.jline.console.completer.FileNameCompleter java.lang.String java.lang.String java.io.File[] java.util.List int top int int java.io.File[]
StackMap stack:
4: aload 9
iload 7
aaload
astore 6
start local 6 5: aload 6
invokevirtual java.io.File.getAbsolutePath:()Ljava/lang/String;
aload 2
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifeq 7
6: iinc 5 1
end local 6 7: StackMap locals:
StackMap stack:
iinc 7 1
StackMap locals:
StackMap stack:
8: iload 7
iload 8
if_icmplt 4
9: aload 3
dup
astore 9
arraylength
istore 8
iconst_0
istore 7
goto 17
StackMap locals:
StackMap stack:
10: aload 9
iload 7
aaload
astore 6
start local 6 11: aload 6
invokevirtual java.io.File.getAbsolutePath:()Ljava/lang/String;
aload 2
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifeq 16
12: new java.lang.StringBuilder
dup
aload 6
invokevirtual java.io.File.getName:()Ljava/lang/String;
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
iload 5
iconst_1
if_icmpne 13
aload 6
invokevirtual java.io.File.isDirectory:()Z
ifeq 13
aload 0
invokevirtual jdk.internal.jline.console.completer.FileNameCompleter.separator:()Ljava/lang/String;
goto 14
StackMap locals: jdk.internal.jline.console.completer.FileNameCompleter java.lang.String java.lang.String java.io.File[] java.util.List int java.io.File int int java.io.File[]
StackMap stack: java.lang.StringBuilder
13: ldc " "
StackMap locals: jdk.internal.jline.console.completer.FileNameCompleter java.lang.String java.lang.String java.io.File[] java.util.List int java.io.File int int java.io.File[]
StackMap stack: java.lang.StringBuilder java.lang.String
14: invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 10
start local 10 15: aload 4
aload 0
aload 6
aload 10
invokevirtual jdk.internal.jline.console.completer.FileNameCompleter.render:(Ljava/io/File;Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
invokeinterface java.lang.CharSequence.toString:()Ljava/lang/String;
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
end local 10 end local 6 16: StackMap locals: jdk.internal.jline.console.completer.FileNameCompleter java.lang.String java.lang.String java.io.File[] java.util.List int top int int java.io.File[]
StackMap stack:
iinc 7 1
StackMap locals:
StackMap stack:
17: iload 7
iload 8
if_icmplt 10
18: aload 1
aload 0
invokevirtual jdk.internal.jline.console.completer.FileNameCompleter.separator:()Ljava/lang/String;
invokevirtual java.lang.String.lastIndexOf:(Ljava/lang/String;)I
istore 6
start local 6 19: iload 6
aload 0
invokevirtual jdk.internal.jline.console.completer.FileNameCompleter.separator:()Ljava/lang/String;
invokevirtual java.lang.String.length:()I
iadd
ireturn
end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 20 0 this Ljdk/internal/jline/console/completer/FileNameCompleter;
0 20 1 buffer Ljava/lang/String;
0 20 2 translated Ljava/lang/String;
0 20 3 files [Ljava/io/File;
0 20 4 candidates Ljava/util/List<Ljava/lang/CharSequence;>;
3 20 5 matches I
5 7 6 file Ljava/io/File;
11 16 6 file Ljava/io/File;
15 16 10 name Ljava/lang/CharSequence;
19 20 6 index I
Signature: (Ljava/lang/String;Ljava/lang/String;[Ljava/io/File;Ljava/util/List<Ljava/lang/CharSequence;>;)I
MethodParameters:
Name Flags
buffer final
translated final
files final
candidates final
protected java.lang.CharSequence render(java.io.File, java.lang.CharSequence);
descriptor: (Ljava/io/File;Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
flags: (0x0004) ACC_PROTECTED
Code:
stack=1, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/internal/jline/console/completer/FileNameCompleter;
0 1 1 file Ljava/io/File;
0 1 2 name Ljava/lang/CharSequence;
MethodParameters:
Name Flags
file final
name final
}
SourceFile: "FileNameCompleter.java"