class jdk.internal.jshell.tool.JShellTool$1ComputeImports
minor version: 0
major version: 59
flags: flags: (0x0020) ACC_SUPER
this_class: jdk.internal.jshell.tool.JShellTool$1ComputeImports
super_class: java.lang.Object
{
final java.lang.String base;
descriptor: Ljava/lang/String;
flags: (0x0010) ACC_FINAL
java.lang.module.ModuleFinder finder;
descriptor: Ljava/lang/module/ModuleFinder;
flags: (0x0000)
void <init>(java.lang.String);
descriptor: (Ljava/lang/String;)V
flags: (0x0000)
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
invokestatic java.lang.module.ModuleFinder.ofSystem:()Ljava/lang/module/ModuleFinder;
putfield jdk.internal.jshell.tool.JShellTool$1ComputeImports.finder:Ljava/lang/module/ModuleFinder;
2: aload 0
aload 1
putfield jdk.internal.jshell.tool.JShellTool$1ComputeImports.base:Ljava/lang/String;
3: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Ljdk/internal/jshell/tool/JShellTool$1ComputeImports;
0 4 1 base Ljava/lang/String;
MethodParameters:
Name Flags
base
java.util.Set<java.lang.module.ModuleDescriptor> modules();
descriptor: ()Ljava/util/Set;
flags: (0x0000)
Code:
stack=3, locals=2, args_size=1
start local 0 0: new java.util.HashSet
dup
invokespecial java.util.HashSet.<init>:()V
astore 1
start local 1 1: aload 0
aload 0
getfield jdk.internal.jshell.tool.JShellTool$1ComputeImports.finder:Ljava/lang/module/ModuleFinder;
aload 0
getfield jdk.internal.jshell.tool.JShellTool$1ComputeImports.base:Ljava/lang/String;
invokeinterface java.lang.module.ModuleFinder.find:(Ljava/lang/String;)Ljava/util/Optional;
aload 1
invokevirtual jdk.internal.jshell.tool.JShellTool$1ComputeImports.moduleClosure:(Ljava/util/Optional;Ljava/util/Set;)V
2: aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljdk/internal/jshell/tool/JShellTool$1ComputeImports;
1 3 1 closure Ljava/util/Set<Ljava/lang/module/ModuleDescriptor;>;
Signature: ()Ljava/util/Set<Ljava/lang/module/ModuleDescriptor;>;
void moduleClosure(java.util.Optional<java.lang.module.ModuleReference>, java.util.Set<java.lang.module.ModuleDescriptor>);
descriptor: (Ljava/util/Optional;Ljava/util/Set;)V
flags: (0x0000)
Code:
stack=3, locals=6, args_size=3
start local 0 start local 1 start local 2 0: aload 1
invokevirtual java.util.Optional.isPresent:()Z
ifeq 8
1: aload 1
invokevirtual java.util.Optional.get:()Ljava/lang/Object;
checkcast java.lang.module.ModuleReference
invokevirtual java.lang.module.ModuleReference.descriptor:()Ljava/lang/module/ModuleDescriptor;
astore 3
start local 3 2: aload 2
aload 3
invokeinterface java.util.Set.add:(Ljava/lang/Object;)Z
ifeq 8
3: aload 3
invokevirtual java.lang.module.ModuleDescriptor.requires:()Ljava/util/Set;
invokeinterface java.util.Set.iterator:()Ljava/util/Iterator;
astore 5
goto 7
StackMap locals: jdk.internal.jshell.tool.JShellTool$1ComputeImports java.util.Optional java.util.Set java.lang.module.ModuleDescriptor top java.util.Iterator
StackMap stack:
4: aload 5
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.lang.module.ModuleDescriptor$Requires
astore 4
start local 4 5: aload 4
invokevirtual java.lang.module.ModuleDescriptor$Requires.modifiers:()Ljava/util/Set;
getstatic java.lang.module.ModuleDescriptor$Requires$Modifier.STATIC:Ljava/lang/module/ModuleDescriptor$Requires$Modifier;
invokeinterface java.util.Set.contains:(Ljava/lang/Object;)Z
ifne 7
6: aload 0
aload 0
getfield jdk.internal.jshell.tool.JShellTool$1ComputeImports.finder:Ljava/lang/module/ModuleFinder;
aload 4
invokevirtual java.lang.module.ModuleDescriptor$Requires.name:()Ljava/lang/String;
invokeinterface java.lang.module.ModuleFinder.find:(Ljava/lang/String;)Ljava/util/Optional;
aload 2
invokevirtual jdk.internal.jshell.tool.JShellTool$1ComputeImports.moduleClosure:(Ljava/util/Optional;Ljava/util/Set;)V
end local 4 7: StackMap locals:
StackMap stack:
aload 5
invokeinterface java.util.Iterator.hasNext:()Z
ifne 4
end local 3 8: StackMap locals: jdk.internal.jshell.tool.JShellTool$1ComputeImports java.util.Optional java.util.Set
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Ljdk/internal/jshell/tool/JShellTool$1ComputeImports;
0 9 1 omr Ljava/util/Optional<Ljava/lang/module/ModuleReference;>;
0 9 2 closure Ljava/util/Set<Ljava/lang/module/ModuleDescriptor;>;
2 8 3 mdesc Ljava/lang/module/ModuleDescriptor;
5 7 4 req Ljava/lang/module/ModuleDescriptor$Requires;
Signature: (Ljava/util/Optional<Ljava/lang/module/ModuleReference;>;Ljava/util/Set<Ljava/lang/module/ModuleDescriptor;>;)V
MethodParameters:
Name Flags
omr
closure
java.util.Set<java.lang.String> packages();
descriptor: ()Ljava/util/Set;
flags: (0x0000)
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual jdk.internal.jshell.tool.JShellTool$1ComputeImports.modules:()Ljava/util/Set;
invokeinterface java.util.Set.stream:()Ljava/util/stream/Stream;
invokedynamic apply()Ljava/util/function/Function;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(Ljava/lang/Object;)Ljava/lang/Object;
jdk/internal/jshell/tool/JShellTool$1ComputeImports.lambda$0(Ljava/lang/module/ModuleDescriptor;)Ljava/util/stream/Stream; (6)
(Ljava/lang/module/ModuleDescriptor;)Ljava/util/stream/Stream;
invokeinterface java.util.stream.Stream.flatMap:(Ljava/util/function/Function;)Ljava/util/stream/Stream;
1: invokedynamic test()Ljava/util/function/Predicate;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(Ljava/lang/Object;)Z
jdk/internal/jshell/tool/JShellTool$1ComputeImports.lambda$1(Ljava/lang/module/ModuleDescriptor$Exports;)Z (6)
(Ljava/lang/module/ModuleDescriptor$Exports;)Z
invokeinterface java.util.stream.Stream.filter:(Ljava/util/function/Predicate;)Ljava/util/stream/Stream;
invokedynamic apply()Ljava/util/function/Function;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(Ljava/lang/Object;)Ljava/lang/Object;
java/lang/Object.toString()Ljava/lang/String; (5)
(Ljava/lang/module/ModuleDescriptor$Exports;)Ljava/lang/String;
invokeinterface java.util.stream.Stream.map:(Ljava/util/function/Function;)Ljava/util/stream/Stream;
invokestatic java.util.stream.Collectors.toSet:()Ljava/util/stream/Collector;
invokeinterface java.util.stream.Stream.collect:(Ljava/util/stream/Collector;)Ljava/lang/Object;
checkcast java.util.Set
2: areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljdk/internal/jshell/tool/JShellTool$1ComputeImports;
Signature: ()Ljava/util/Set<Ljava/lang/String;>;
java.lang.String imports();
descriptor: ()Ljava/lang/String;
flags: (0x0000)
Code:
stack=2, locals=3, args_size=1
start local 0 0: aload 0
invokevirtual jdk.internal.jshell.tool.JShellTool$1ComputeImports.packages:()Ljava/util/Set;
astore 1
start local 1 1: aload 1
aload 1
invokeinterface java.util.Set.size:()I
anewarray java.lang.String
invokeinterface java.util.Set.toArray:([Ljava/lang/Object;)[Ljava/lang/Object;
checkcast java.lang.String[]
astore 2
start local 2 2: aload 2
invokestatic java.util.Arrays.sort:([Ljava/lang/Object;)V
3: aload 2
invokestatic java.util.Arrays.stream:([Ljava/lang/Object;)Ljava/util/stream/Stream;
4: invokedynamic apply()Ljava/util/function/Function;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(Ljava/lang/Object;)Ljava/lang/Object;
jdk/internal/jshell/tool/JShellTool$1ComputeImports.lambda$3(Ljava/lang/String;)Ljava/lang/String; (6)
(Ljava/lang/String;)Ljava/lang/String;
invokeinterface java.util.stream.Stream.map:(Ljava/util/function/Function;)Ljava/util/stream/Stream;
5: invokestatic java.util.stream.Collectors.joining:()Ljava/util/stream/Collector;
invokeinterface java.util.stream.Stream.collect:(Ljava/util/stream/Collector;)Ljava/lang/Object;
checkcast java.lang.String
6: areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Ljdk/internal/jshell/tool/JShellTool$1ComputeImports;
1 7 1 si Ljava/util/Set<Ljava/lang/String;>;
2 7 2 ai [Ljava/lang/String;
private static java.util.stream.Stream lambda$0(java.lang.module.ModuleDescriptor);
descriptor: (Ljava/lang/module/ModuleDescriptor;)Ljava/util/stream/Stream;
flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual java.lang.module.ModuleDescriptor.exports:()Ljava/util/Set;
invokeinterface java.util.Set.stream:()Ljava/util/stream/Stream;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 md Ljava/lang/module/ModuleDescriptor;
private static boolean lambda$1(java.lang.module.ModuleDescriptor$Exports);
descriptor: (Ljava/lang/module/ModuleDescriptor$Exports;)Z
flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual java.lang.module.ModuleDescriptor$Exports.isQualified:()Z
ifeq 1
iconst_0
goto 2
StackMap locals:
StackMap stack:
1: iconst_1
StackMap locals:
StackMap stack: int
2: ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 e Ljava/lang/module/ModuleDescriptor$Exports;
private static java.lang.String lambda$3(java.lang.String);
descriptor: (Ljava/lang/String;)Ljava/lang/String;
flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=5, locals=1, args_size=1
start local 0 0: ldc "import %s.*;\n"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 0
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 p Ljava/lang/String;
}
SourceFile: "JShellTool.java"
EnclosingMethod: jdk.internal.jshell.tool.JShellTool.readResource:(Ljava/lang/String;)Ljava/lang/String;
NestHost: jdk.internal.jshell.tool.JShellTool
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles
public final Exports = java.lang.module.ModuleDescriptor$Exports of java.lang.module.ModuleDescriptor
public final Requires = java.lang.module.ModuleDescriptor$Requires of java.lang.module.ModuleDescriptor
public final Modifier = java.lang.module.ModuleDescriptor$Requires$Modifier of java.lang.module.ModuleDescriptor$Requires
ComputeImports = jdk.internal.jshell.tool.JShellTool$1ComputeImports