public class jdk.internal.jline.console.completer.CandidateListCompletionHandler implements jdk.internal.jline.console.completer.CompletionHandler
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: jdk.internal.jline.console.completer.CandidateListCompletionHandler
super_class: java.lang.Object
{
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/CandidateListCompletionHandler;
public boolean complete(jdk.internal.jline.console.ConsoleReader, java.util.List<java.lang.CharSequence>, );
descriptor: (Ljdk/internal/jline/console/ConsoleReader;Ljava/util/List;I)Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=6, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 1
invokevirtual jdk.internal.jline.console.ConsoleReader.getCursorBuffer:()Ljdk/internal/jline/console/CursorBuffer;
astore 4
start local 4 1: aload 2
invokeinterface java.util.List.size:()I
iconst_1
if_icmpne 7
2: aload 2
iconst_0
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast java.lang.CharSequence
astore 5
start local 5 3: aload 5
aload 4
invokevirtual jdk.internal.jline.console.CursorBuffer.toString:()Ljava/lang/String;
invokevirtual java.lang.Object.equals:(Ljava/lang/Object;)Z
ifeq 5
4: iconst_0
ireturn
5: StackMap locals: jdk.internal.jline.console.CursorBuffer java.lang.CharSequence
StackMap stack:
aload 1
aload 5
iload 3
invokestatic jdk.internal.jline.console.completer.CandidateListCompletionHandler.setBuffer:(Ljdk/internal/jline/console/ConsoleReader;Ljava/lang/CharSequence;I)V
6: iconst_1
ireturn
end local 5 7: StackMap locals:
StackMap stack:
aload 2
invokeinterface java.util.List.size:()I
iconst_1
if_icmple 10
8: aload 0
aload 2
invokevirtual jdk.internal.jline.console.completer.CandidateListCompletionHandler.getUnambiguousCompletions:(Ljava/util/List;)Ljava/lang/String;
astore 5
start local 5 9: aload 1
aload 5
iload 3
invokestatic jdk.internal.jline.console.completer.CandidateListCompletionHandler.setBuffer:(Ljdk/internal/jline/console/ConsoleReader;Ljava/lang/CharSequence;I)V
end local 5 10: StackMap locals:
StackMap stack:
aload 1
aload 2
invokestatic jdk.internal.jline.console.completer.CandidateListCompletionHandler.printCandidates:(Ljdk/internal/jline/console/ConsoleReader;Ljava/util/Collection;)V
11: aload 1
invokevirtual jdk.internal.jline.console.ConsoleReader.drawLine:()V
12: iconst_1
ireturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Ljdk/internal/jline/console/completer/CandidateListCompletionHandler;
0 13 1 reader Ljdk/internal/jline/console/ConsoleReader;
0 13 2 candidates Ljava/util/List<Ljava/lang/CharSequence;>;
0 13 3 pos I
1 13 4 buf Ljdk/internal/jline/console/CursorBuffer;
3 7 5 value Ljava/lang/CharSequence;
9 10 5 value Ljava/lang/String;
Exceptions:
throws java.io.IOException
Signature: (Ljdk/internal/jline/console/ConsoleReader;Ljava/util/List<Ljava/lang/CharSequence;>;I)Z
MethodParameters:
Name Flags
reader final
candidates final
pos final
public static void setBuffer(jdk.internal.jline.console.ConsoleReader, java.lang.CharSequence, int);
descriptor: (Ljdk/internal/jline/console/ConsoleReader;Ljava/lang/CharSequence;I)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: StackMap locals:
StackMap stack:
aload 0
invokevirtual jdk.internal.jline.console.ConsoleReader.getCursorBuffer:()Ljdk/internal/jline/console/CursorBuffer;
getfield jdk.internal.jline.console.CursorBuffer.cursor:I
iload 2
if_icmple 1
aload 0
invokevirtual jdk.internal.jline.console.ConsoleReader.backspace:()Z
ifne 0
1: StackMap locals:
StackMap stack:
aload 0
aload 1
invokevirtual jdk.internal.jline.console.ConsoleReader.putString:(Ljava/lang/CharSequence;)V
2: aload 0
iload 2
aload 1
invokeinterface java.lang.CharSequence.length:()I
iadd
invokevirtual jdk.internal.jline.console.ConsoleReader.setCursorPosition:(I)Z
pop
3: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 reader Ljdk/internal/jline/console/ConsoleReader;
0 4 1 value Ljava/lang/CharSequence;
0 4 2 offset I
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
reader final
value final
offset final
public static void printCandidates(jdk.internal.jline.console.ConsoleReader, java.util.Collection<java.lang.CharSequence>);
descriptor: (Ljdk/internal/jline/console/ConsoleReader;Ljava/util/Collection;)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=6, locals=8, args_size=2
start local 0 start local 1 0: new java.util.HashSet
dup
aload 1
invokespecial java.util.HashSet.<init>:(Ljava/util/Collection;)V
astore 2
start local 2 1: aload 2
invokeinterface java.util.Set.size:()I
aload 0
invokevirtual jdk.internal.jline.console.ConsoleReader.getAutoprintThreshold:()I
if_icmple 17
2: aload 0
getstatic jdk.internal.jline.console.completer.CandidateListCompletionHandler$Messages.DISPLAY_CANDIDATES:Ljdk/internal/jline/console/completer/CandidateListCompletionHandler$Messages;
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 1
invokeinterface java.util.Collection.size:()I
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
invokevirtual jdk.internal.jline.console.completer.CandidateListCompletionHandler$Messages.format:([Ljava/lang/Object;)Ljava/lang/String;
invokevirtual jdk.internal.jline.console.ConsoleReader.print:(Ljava/lang/CharSequence;)V
3: aload 0
invokevirtual jdk.internal.jline.console.ConsoleReader.flush:()V
4: getstatic jdk.internal.jline.console.completer.CandidateListCompletionHandler$Messages.DISPLAY_CANDIDATES_NO:Ljdk/internal/jline/console/completer/CandidateListCompletionHandler$Messages;
iconst_0
anewarray java.lang.Object
invokevirtual jdk.internal.jline.console.completer.CandidateListCompletionHandler$Messages.format:([Ljava/lang/Object;)Ljava/lang/String;
astore 4
start local 4 5: getstatic jdk.internal.jline.console.completer.CandidateListCompletionHandler$Messages.DISPLAY_CANDIDATES_YES:Ljdk/internal/jline/console/completer/CandidateListCompletionHandler$Messages;
iconst_0
anewarray java.lang.Object
invokevirtual jdk.internal.jline.console.completer.CandidateListCompletionHandler$Messages.format:([Ljava/lang/Object;)Ljava/lang/String;
astore 5
start local 5 6: iconst_2
newarray 5
dup
iconst_0
aload 5
iconst_0
invokevirtual java.lang.String.charAt:(I)C
castore
dup
iconst_1
aload 4
iconst_0
invokevirtual java.lang.String.charAt:(I)C
castore
astore 6
start local 6 7: goto 15
start local 3 8: StackMap locals: jdk.internal.jline.console.ConsoleReader java.util.Collection java.util.Set int java.lang.String java.lang.String char[]
StackMap stack:
new java.lang.String
dup
iconst_1
newarray 5
dup
iconst_0
iload 3
i2c
castore
invokespecial java.lang.String.<init>:([C)V
astore 7
start local 7 9: aload 4
aload 7
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifeq 12
10: aload 0
invokevirtual jdk.internal.jline.console.ConsoleReader.println:()V
11: return
12: StackMap locals: java.lang.String
StackMap stack:
aload 5
aload 7
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifeq 14
13: goto 17
14: StackMap locals:
StackMap stack:
aload 0
invokevirtual jdk.internal.jline.console.ConsoleReader.beep:()V
end local 7 end local 3 15: StackMap locals: jdk.internal.jline.console.ConsoleReader java.util.Collection java.util.Set top java.lang.String java.lang.String char[]
StackMap stack:
aload 0
aload 6
invokevirtual jdk.internal.jline.console.ConsoleReader.readCharacter:([C)I
dup
istore 3
start local 3 16: iconst_m1
if_icmpne 8
end local 6 end local 5 end local 4 end local 3 17: StackMap locals: jdk.internal.jline.console.ConsoleReader java.util.Collection java.util.Set
StackMap stack:
aload 2
invokeinterface java.util.Set.size:()I
aload 1
invokeinterface java.util.Collection.size:()I
if_icmpeq 25
18: new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
astore 3
start local 3 19: aload 1
invokeinterface java.util.Collection.iterator:()Ljava/util/Iterator;
astore 5
goto 23
StackMap locals: jdk.internal.jline.console.ConsoleReader java.util.Collection java.util.Set java.util.Collection top java.util.Iterator
StackMap stack:
20: aload 5
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.lang.CharSequence
astore 4
start local 4 21: aload 3
aload 4
invokeinterface java.util.Collection.contains:(Ljava/lang/Object;)Z
ifne 23
22: aload 3
aload 4
invokeinterface java.util.Collection.add:(Ljava/lang/Object;)Z
pop
end local 4 23: StackMap locals:
StackMap stack:
aload 5
invokeinterface java.util.Iterator.hasNext:()Z
ifne 20
24: aload 3
astore 1
end local 3 25: StackMap locals: jdk.internal.jline.console.ConsoleReader java.util.Collection java.util.Set
StackMap stack:
aload 0
invokevirtual jdk.internal.jline.console.ConsoleReader.println:()V
26: aload 0
aload 1
invokevirtual jdk.internal.jline.console.ConsoleReader.printColumns:(Ljava/util/Collection;)V
27: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 28 0 reader Ljdk/internal/jline/console/ConsoleReader;
0 28 1 candidates Ljava/util/Collection<Ljava/lang/CharSequence;>;
1 28 2 distinct Ljava/util/Set<Ljava/lang/CharSequence;>;
8 15 3 c I
16 17 3 c I
5 17 4 noOpt Ljava/lang/String;
6 17 5 yesOpt Ljava/lang/String;
7 17 6 allowed [C
9 15 7 tmp Ljava/lang/String;
19 25 3 copy Ljava/util/Collection<Ljava/lang/CharSequence;>;
21 23 4 next Ljava/lang/CharSequence;
Exceptions:
throws java.io.IOException
Signature: (Ljdk/internal/jline/console/ConsoleReader;Ljava/util/Collection<Ljava/lang/CharSequence;>;)V
MethodParameters:
Name Flags
reader final
candidates
private java.lang.String getUnambiguousCompletions(java.util.List<java.lang.CharSequence>);
descriptor: (Ljava/util/List;)Ljava/lang/String;
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=6, args_size=2
start local 0 start local 1 0: aload 1
ifnull 1
aload 1
invokeinterface java.util.List.isEmpty:()Z
ifeq 2
1: StackMap locals:
StackMap stack:
aconst_null
areturn
2: StackMap locals:
StackMap stack:
aload 1
aload 1
invokeinterface java.util.List.size:()I
anewarray java.lang.String
invokeinterface java.util.List.toArray:([Ljava/lang/Object;)[Ljava/lang/Object;
checkcast java.lang.String[]
astore 2
start local 2 3: aload 2
iconst_0
aaload
astore 3
start local 3 4: new java.lang.StringBuilder
dup
invokespecial java.lang.StringBuilder.<init>:()V
astore 4
start local 4 5: iconst_0
istore 5
start local 5 6: goto 10
7: StackMap locals: jdk.internal.jline.console.completer.CandidateListCompletionHandler java.util.List java.lang.String[] java.lang.String java.lang.StringBuilder int
StackMap stack:
aload 0
aload 3
iconst_0
iload 5
iconst_1
iadd
invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
aload 2
invokevirtual jdk.internal.jline.console.completer.CandidateListCompletionHandler.startsWith:(Ljava/lang/String;[Ljava/lang/String;)Z
ifeq 11
8: aload 4
aload 3
iload 5
invokevirtual java.lang.String.charAt:(I)C
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
pop
9: iinc 5 1
StackMap locals:
StackMap stack:
10: iload 5
aload 3
invokevirtual java.lang.String.length:()I
if_icmplt 7
end local 5 11: StackMap locals:
StackMap stack:
aload 4
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Ljdk/internal/jline/console/completer/CandidateListCompletionHandler;
0 12 1 candidates Ljava/util/List<Ljava/lang/CharSequence;>;
3 12 2 strings [Ljava/lang/String;
4 12 3 first Ljava/lang/String;
5 12 4 candidate Ljava/lang/StringBuilder;
6 11 5 i I
Signature: (Ljava/util/List<Ljava/lang/CharSequence;>;)Ljava/lang/String;
MethodParameters:
Name Flags
candidates final
private boolean startsWith(java.lang.String, java.lang.String[]);
descriptor: (Ljava/lang/String;[Ljava/lang/String;)Z
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=7, args_size=3
start local 0 start local 1 start local 2 0: aload 2
dup
astore 6
arraylength
istore 5
iconst_0
istore 4
goto 5
StackMap locals: jdk.internal.jline.console.completer.CandidateListCompletionHandler java.lang.String java.lang.String[] top int int java.lang.String[]
StackMap stack:
1: aload 6
iload 4
aaload
astore 3
start local 3 2: aload 3
aload 1
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifne 4
3: iconst_0
ireturn
end local 3 4: StackMap locals:
StackMap stack:
iinc 4 1
StackMap locals:
StackMap stack:
5: iload 4
iload 5
if_icmplt 1
6: iconst_1
ireturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Ljdk/internal/jline/console/completer/CandidateListCompletionHandler;
0 7 1 starts Ljava/lang/String;
0 7 2 candidates [Ljava/lang/String;
2 4 3 candidate Ljava/lang/String;
MethodParameters:
Name Flags
starts final
candidates final
}
SourceFile: "CandidateListCompletionHandler.java"
NestMembers:
jdk.internal.jline.console.completer.CandidateListCompletionHandler$Messages
InnerClasses:
private final Messages = jdk.internal.jline.console.completer.CandidateListCompletionHandler$Messages of jdk.internal.jline.console.completer.CandidateListCompletionHandler