class jdk.internal.jshell.tool.JShellTool$SetEditor
minor version: 0
major version: 59
flags: flags: (0x0020) ACC_SUPER
this_class: jdk.internal.jshell.tool.JShellTool$SetEditor
super_class: java.lang.Object
{
private final jdk.internal.jshell.tool.ArgTokenizer at;
descriptor: Ljdk/internal/jshell/tool/ArgTokenizer;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.lang.String[] command;
descriptor: [Ljava/lang/String;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final boolean hasCommand;
descriptor: Z
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final boolean defaultOption;
descriptor: Z
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final boolean deleteOption;
descriptor: Z
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final boolean waitOption;
descriptor: Z
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final boolean retainOption;
descriptor: Z
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final int primaryOptionCount;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
final jdk.internal.jshell.tool.JShellTool this$0;
descriptor: Ljdk/internal/jshell/tool/JShellTool;
flags: (0x1010) ACC_FINAL, ACC_SYNTHETIC
void <init>(jdk.internal.jshell.tool.JShellTool, jdk.internal.jshell.tool.ArgTokenizer);
descriptor: (Ljdk/internal/jshell/tool/JShellTool;Ljdk/internal/jshell/tool/ArgTokenizer;)V
flags: (0x0000)
Code:
stack=5, locals=4, args_size=3
start local 0 start local 2 0: aload 0
aload 1
putfield jdk.internal.jshell.tool.JShellTool$SetEditor.this$0:Ljdk/internal/jshell/tool/JShellTool;
aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 2
iconst_4
anewarray java.lang.String
dup
iconst_0
ldc "-default"
aastore
dup
iconst_1
ldc "-wait"
aastore
dup
iconst_2
ldc "-retain"
aastore
dup
iconst_3
ldc "-delete"
aastore
invokevirtual jdk.internal.jshell.tool.ArgTokenizer.allowedOptions:([Ljava/lang/String;)V
2: aload 2
invokevirtual jdk.internal.jshell.tool.ArgTokenizer.next:()Ljava/lang/String;
pop
3: new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
astore 3
start local 3 4: goto 7
5: StackMap locals: jdk.internal.jshell.tool.JShellTool$SetEditor jdk.internal.jshell.tool.JShellTool jdk.internal.jshell.tool.ArgTokenizer java.util.List
StackMap stack:
aload 3
aload 2
invokevirtual jdk.internal.jshell.tool.ArgTokenizer.val:()Ljava/lang/String;
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
6: aload 2
invokevirtual jdk.internal.jshell.tool.ArgTokenizer.nextToken:()V
7: StackMap locals:
StackMap stack:
aload 2
invokevirtual jdk.internal.jshell.tool.ArgTokenizer.val:()Ljava/lang/String;
ifnonnull 5
8: aload 0
aload 2
putfield jdk.internal.jshell.tool.JShellTool$SetEditor.at:Ljdk/internal/jshell/tool/ArgTokenizer;
9: aload 0
aload 3
aload 3
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[]
putfield jdk.internal.jshell.tool.JShellTool$SetEditor.command:[Ljava/lang/String;
10: aload 0
aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.command:[Ljava/lang/String;
arraylength
ifle 11
iconst_1
goto 12
StackMap locals:
StackMap stack: jdk.internal.jshell.tool.JShellTool$SetEditor
11: iconst_0
StackMap locals: jdk.internal.jshell.tool.JShellTool$SetEditor jdk.internal.jshell.tool.JShellTool jdk.internal.jshell.tool.ArgTokenizer java.util.List
StackMap stack: jdk.internal.jshell.tool.JShellTool$SetEditor int
12: putfield jdk.internal.jshell.tool.JShellTool$SetEditor.hasCommand:Z
13: aload 0
aload 2
ldc "-default"
invokevirtual jdk.internal.jshell.tool.ArgTokenizer.hasOption:(Ljava/lang/String;)Z
putfield jdk.internal.jshell.tool.JShellTool$SetEditor.defaultOption:Z
14: aload 0
aload 2
ldc "-delete"
invokevirtual jdk.internal.jshell.tool.ArgTokenizer.hasOption:(Ljava/lang/String;)Z
putfield jdk.internal.jshell.tool.JShellTool$SetEditor.deleteOption:Z
15: aload 0
aload 2
ldc "-wait"
invokevirtual jdk.internal.jshell.tool.ArgTokenizer.hasOption:(Ljava/lang/String;)Z
putfield jdk.internal.jshell.tool.JShellTool$SetEditor.waitOption:Z
16: aload 0
aload 2
ldc "-retain"
invokevirtual jdk.internal.jshell.tool.ArgTokenizer.hasOption:(Ljava/lang/String;)Z
putfield jdk.internal.jshell.tool.JShellTool$SetEditor.retainOption:Z
17: aload 0
aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.hasCommand:Z
ifeq 18
iconst_1
goto 19
StackMap locals:
StackMap stack: jdk.internal.jshell.tool.JShellTool$SetEditor
18: iconst_0
StackMap locals: jdk.internal.jshell.tool.JShellTool$SetEditor jdk.internal.jshell.tool.JShellTool jdk.internal.jshell.tool.ArgTokenizer java.util.List
StackMap stack: jdk.internal.jshell.tool.JShellTool$SetEditor int
19: aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.defaultOption:Z
ifeq 20
iconst_1
goto 21
StackMap locals: jdk.internal.jshell.tool.JShellTool$SetEditor jdk.internal.jshell.tool.JShellTool jdk.internal.jshell.tool.ArgTokenizer java.util.List
StackMap stack: jdk.internal.jshell.tool.JShellTool$SetEditor int
20: iconst_0
StackMap locals: jdk.internal.jshell.tool.JShellTool$SetEditor jdk.internal.jshell.tool.JShellTool jdk.internal.jshell.tool.ArgTokenizer java.util.List
StackMap stack: jdk.internal.jshell.tool.JShellTool$SetEditor int int
21: iadd
aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.deleteOption:Z
ifeq 22
iconst_1
goto 23
StackMap locals: jdk.internal.jshell.tool.JShellTool$SetEditor jdk.internal.jshell.tool.JShellTool jdk.internal.jshell.tool.ArgTokenizer java.util.List
StackMap stack: jdk.internal.jshell.tool.JShellTool$SetEditor int
22: iconst_0
StackMap locals: jdk.internal.jshell.tool.JShellTool$SetEditor jdk.internal.jshell.tool.JShellTool jdk.internal.jshell.tool.ArgTokenizer java.util.List
StackMap stack: jdk.internal.jshell.tool.JShellTool$SetEditor int int
23: iadd
putfield jdk.internal.jshell.tool.JShellTool$SetEditor.primaryOptionCount:I
24: return
end local 3 end local 2 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 25 0 this Ljdk/internal/jshell/tool/JShellTool$SetEditor;
0 25 2 at Ljdk/internal/jshell/tool/ArgTokenizer;
4 25 3 ed Ljava/util/List<Ljava/lang/String;>;
MethodParameters:
Name Flags
this$0 final
at
void <init>(jdk.internal.jshell.tool.JShellTool);
descriptor: (Ljdk/internal/jshell/tool/JShellTool;)V
flags: (0x0000)
Code:
stack=6, locals=2, args_size=2
start local 0 0: aload 0
aload 1
new jdk.internal.jshell.tool.ArgTokenizer
dup
ldc ""
ldc ""
invokespecial jdk.internal.jshell.tool.ArgTokenizer.<init>:(Ljava/lang/String;Ljava/lang/String;)V
invokespecial jdk.internal.jshell.tool.JShellTool$SetEditor.<init>:(Ljdk/internal/jshell/tool/JShellTool;Ljdk/internal/jshell/tool/ArgTokenizer;)V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/internal/jshell/tool/JShellTool$SetEditor;
MethodParameters:
Name Flags
this$0 final
boolean set();
descriptor: ()Z
flags: (0x0000)
Code:
stack=7, locals=2, args_size=1
start local 0 0: aload 0
invokevirtual jdk.internal.jshell.tool.JShellTool$SetEditor.check:()Z
ifne 2
1: iconst_0
ireturn
2: StackMap locals:
StackMap stack:
aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.primaryOptionCount:I
ifne 9
aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.retainOption:Z
ifne 9
3: aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.this$0:Ljdk/internal/jshell/tool/JShellTool;
getfield jdk.internal.jshell.tool.JShellTool.prefs:Ljdk/internal/jshell/tool/PersistentStorage;
invokestatic jdk.internal.jshell.tool.JShellTool$EditorSetting.fromPrefs:(Ljdk/internal/jshell/tool/PersistentStorage;)Ljdk/internal/jshell/tool/JShellTool$EditorSetting;
astore 1
start local 1 4: aload 1
ifnull 6
5: aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.this$0:Ljdk/internal/jshell/tool/JShellTool;
ldc "/set editor -retain %s"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 0
aload 1
invokevirtual jdk.internal.jshell.tool.JShellTool$SetEditor.format:(Ljdk/internal/jshell/tool/JShellTool$EditorSetting;)Ljava/lang/String;
aastore
invokevirtual jdk.internal.jshell.tool.JShellTool.hard:(Ljava/lang/String;[Ljava/lang/Object;)V
6: StackMap locals: jdk.internal.jshell.tool.JShellTool$EditorSetting
StackMap stack:
aload 1
ifnull 7
aload 1
aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.this$0:Ljdk/internal/jshell/tool/JShellTool;
getfield jdk.internal.jshell.tool.JShellTool.editor:Ljdk/internal/jshell/tool/JShellTool$EditorSetting;
invokevirtual jdk.internal.jshell.tool.JShellTool$EditorSetting.equals:(Ljava/lang/Object;)Z
ifne 8
7: StackMap locals:
StackMap stack:
aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.this$0:Ljdk/internal/jshell/tool/JShellTool;
ldc "/set editor %s"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 0
aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.this$0:Ljdk/internal/jshell/tool/JShellTool;
getfield jdk.internal.jshell.tool.JShellTool.editor:Ljdk/internal/jshell/tool/JShellTool$EditorSetting;
invokevirtual jdk.internal.jshell.tool.JShellTool$SetEditor.format:(Ljdk/internal/jshell/tool/JShellTool$EditorSetting;)Ljava/lang/String;
aastore
invokevirtual jdk.internal.jshell.tool.JShellTool.hard:(Ljava/lang/String;[Ljava/lang/Object;)V
8: StackMap locals:
StackMap stack:
iconst_1
ireturn
end local 1 9: StackMap locals:
StackMap stack:
aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.retainOption:Z
ifeq 11
aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.deleteOption:Z
ifeq 11
10: aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.this$0:Ljdk/internal/jshell/tool/JShellTool;
getfield jdk.internal.jshell.tool.JShellTool.prefs:Ljdk/internal/jshell/tool/PersistentStorage;
invokestatic jdk.internal.jshell.tool.JShellTool$EditorSetting.removePrefs:(Ljdk/internal/jshell/tool/PersistentStorage;)V
11: StackMap locals:
StackMap stack:
aload 0
invokevirtual jdk.internal.jshell.tool.JShellTool$SetEditor.install:()V
12: aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.retainOption:Z
ifeq 15
aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.deleteOption:Z
ifne 15
13: aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.this$0:Ljdk/internal/jshell/tool/JShellTool;
getfield jdk.internal.jshell.tool.JShellTool.editor:Ljdk/internal/jshell/tool/JShellTool$EditorSetting;
aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.this$0:Ljdk/internal/jshell/tool/JShellTool;
getfield jdk.internal.jshell.tool.JShellTool.prefs:Ljdk/internal/jshell/tool/PersistentStorage;
invokevirtual jdk.internal.jshell.tool.JShellTool$EditorSetting.toPrefs:(Ljdk/internal/jshell/tool/PersistentStorage;)V
14: aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.this$0:Ljdk/internal/jshell/tool/JShellTool;
ldc "jshell.msg.set.editor.retain"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 0
aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.this$0:Ljdk/internal/jshell/tool/JShellTool;
getfield jdk.internal.jshell.tool.JShellTool.editor:Ljdk/internal/jshell/tool/JShellTool$EditorSetting;
invokevirtual jdk.internal.jshell.tool.JShellTool$SetEditor.format:(Ljdk/internal/jshell/tool/JShellTool$EditorSetting;)Ljava/lang/String;
aastore
invokevirtual jdk.internal.jshell.tool.JShellTool.fluffmsg:(Ljava/lang/String;[Ljava/lang/Object;)V
15: StackMap locals:
StackMap stack:
iconst_1
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 this Ljdk/internal/jshell/tool/JShellTool$SetEditor;
4 9 1 retained Ljdk/internal/jshell/tool/JShellTool$EditorSetting;
private boolean check();
descriptor: ()Z
flags: (0x0002) ACC_PRIVATE
Code:
stack=6, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.this$0:Ljdk/internal/jshell/tool/JShellTool;
aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.at:Ljdk/internal/jshell/tool/ArgTokenizer;
invokevirtual jdk.internal.jshell.tool.JShellTool.checkOptionsAndRemainingInput:(Ljdk/internal/jshell/tool/ArgTokenizer;)Z
ifne 2
1: iconst_0
ireturn
2: StackMap locals:
StackMap stack:
aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.primaryOptionCount:I
iconst_1
if_icmple 5
3: aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.this$0:Ljdk/internal/jshell/tool/JShellTool;
ldc "jshell.err.default.option.or.program"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.at:Ljdk/internal/jshell/tool/ArgTokenizer;
invokevirtual jdk.internal.jshell.tool.ArgTokenizer.whole:()Ljava/lang/String;
aastore
invokevirtual jdk.internal.jshell.tool.JShellTool.errormsg:(Ljava/lang/String;[Ljava/lang/Object;)V
4: iconst_0
ireturn
5: StackMap locals:
StackMap stack:
aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.waitOption:Z
ifeq 8
aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.hasCommand:Z
ifne 8
6: aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.this$0:Ljdk/internal/jshell/tool/JShellTool;
ldc "jshell.err.wait.applies.to.external.editor"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.at:Ljdk/internal/jshell/tool/ArgTokenizer;
invokevirtual jdk.internal.jshell.tool.ArgTokenizer.whole:()Ljava/lang/String;
aastore
invokevirtual jdk.internal.jshell.tool.JShellTool.errormsg:(Ljava/lang/String;[Ljava/lang/Object;)V
7: iconst_0
ireturn
8: StackMap locals:
StackMap stack:
iconst_1
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Ljdk/internal/jshell/tool/JShellTool$SetEditor;
private void install();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=7, locals=1, args_size=1
start local 0 0: aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.hasCommand:Z
ifeq 3
1: aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.this$0:Ljdk/internal/jshell/tool/JShellTool;
new jdk.internal.jshell.tool.JShellTool$EditorSetting
dup
aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.command:[Ljava/lang/String;
aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.waitOption:Z
invokespecial jdk.internal.jshell.tool.JShellTool$EditorSetting.<init>:([Ljava/lang/String;Z)V
putfield jdk.internal.jshell.tool.JShellTool.editor:Ljdk/internal/jshell/tool/JShellTool$EditorSetting;
2: goto 10
StackMap locals:
StackMap stack:
3: aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.defaultOption:Z
ifeq 6
4: aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.this$0:Ljdk/internal/jshell/tool/JShellTool;
getstatic jdk.internal.jshell.tool.JShellTool.BUILT_IN_EDITOR:Ljdk/internal/jshell/tool/JShellTool$EditorSetting;
putfield jdk.internal.jshell.tool.JShellTool.editor:Ljdk/internal/jshell/tool/JShellTool$EditorSetting;
5: goto 10
StackMap locals:
StackMap stack:
6: aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.deleteOption:Z
ifeq 9
7: aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.this$0:Ljdk/internal/jshell/tool/JShellTool;
invokevirtual jdk.internal.jshell.tool.JShellTool.configEditor:()Ljdk/internal/jshell/tool/JShellTool$EditorSetting;
pop
8: goto 10
9: StackMap locals:
StackMap stack:
return
10: StackMap locals:
StackMap stack:
aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.this$0:Ljdk/internal/jshell/tool/JShellTool;
ldc "jshell.msg.set.editor.set"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 0
aload 0
getfield jdk.internal.jshell.tool.JShellTool$SetEditor.this$0:Ljdk/internal/jshell/tool/JShellTool;
getfield jdk.internal.jshell.tool.JShellTool.editor:Ljdk/internal/jshell/tool/JShellTool$EditorSetting;
invokevirtual jdk.internal.jshell.tool.JShellTool$SetEditor.format:(Ljdk/internal/jshell/tool/JShellTool$EditorSetting;)Ljava/lang/String;
aastore
invokevirtual jdk.internal.jshell.tool.JShellTool.fluffmsg:(Ljava/lang/String;[Ljava/lang/Object;)V
11: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Ljdk/internal/jshell/tool/JShellTool$SetEditor;
private java.lang.String format(jdk.internal.jshell.tool.JShellTool$EditorSetting);
descriptor: (Ljdk/internal/jshell/tool/JShellTool$EditorSetting;)Ljava/lang/String;
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=3, args_size=2
start local 0 start local 1 0: aload 1
getstatic jdk.internal.jshell.tool.JShellTool.BUILT_IN_EDITOR:Ljdk/internal/jshell/tool/JShellTool$EditorSetting;
if_acmpne 2
1: ldc "-default"
areturn
2: StackMap locals:
StackMap stack:
aload 1
getfield jdk.internal.jshell.tool.JShellTool$EditorSetting.cmd:[Ljava/lang/String;
invokestatic java.util.Arrays.stream:([Ljava/lang/Object;)Ljava/util/stream/Stream;
astore 2
start local 2 3: aload 1
getfield jdk.internal.jshell.tool.JShellTool$EditorSetting.wait:Z
ifeq 5
4: ldc "-wait"
invokestatic java.util.stream.Stream.of:(Ljava/lang/Object;)Ljava/util/stream/Stream;
aload 2
invokestatic java.util.stream.Stream.concat:(Ljava/util/stream/Stream;Ljava/util/stream/Stream;)Ljava/util/stream/Stream;
astore 2
5: StackMap locals: java.util.stream.Stream
StackMap stack:
aload 2
ldc " "
invokestatic java.util.stream.Collectors.joining:(Ljava/lang/CharSequence;)Ljava/util/stream/Collector;
invokeinterface java.util.stream.Stream.collect:(Ljava/util/stream/Collector;)Ljava/lang/Object;
checkcast java.lang.String
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Ljdk/internal/jshell/tool/JShellTool$SetEditor;
0 6 1 ed Ljdk/internal/jshell/tool/JShellTool$EditorSetting;
3 6 2 elems Ljava/util/stream/Stream<Ljava/lang/String;>;
MethodParameters:
Name Flags
ed
}
SourceFile: "JShellTool.java"
NestHost: jdk.internal.jshell.tool.JShellTool
InnerClasses:
EditorSetting = jdk.internal.jshell.tool.JShellTool$EditorSetting of jdk.internal.jshell.tool.JShellTool
SetEditor = jdk.internal.jshell.tool.JShellTool$SetEditor of jdk.internal.jshell.tool.JShellTool