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 // jdk.internal.jshell.tool.JShellTool$1ComputeImports this
        start local 1 // java.lang.String base
         0: .line 3074
            aload 0 /* this */
            invokespecial java.lang.Object.<init>:()V
         1: .line 3072
            aload 0 /* this */
            invokestatic java.lang.module.ModuleFinder.ofSystem:()Ljava/lang/module/ModuleFinder;
            putfield jdk.internal.jshell.tool.JShellTool$1ComputeImports.finder:Ljava/lang/module/ModuleFinder;
         2: .line 3075
            aload 0 /* this */
            aload 1 /* base */
            putfield jdk.internal.jshell.tool.JShellTool$1ComputeImports.base:Ljava/lang/String;
         3: .line 3076
            return
        end local 1 // java.lang.String base
        end local 0 // jdk.internal.jshell.tool.JShellTool$1ComputeImports this
      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 // jdk.internal.jshell.tool.JShellTool$1ComputeImports this
         0: .line 3079
            new java.util.HashSet
            dup
            invokespecial java.util.HashSet.<init>:()V
            astore 1 /* closure */
        start local 1 // java.util.Set closure
         1: .line 3080
            aload 0 /* this */
            aload 0 /* this */
            getfield jdk.internal.jshell.tool.JShellTool$1ComputeImports.finder:Ljava/lang/module/ModuleFinder;
            aload 0 /* this */
            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 /* closure */
            invokevirtual jdk.internal.jshell.tool.JShellTool$1ComputeImports.moduleClosure:(Ljava/util/Optional;Ljava/util/Set;)V
         2: .line 3081
            aload 1 /* closure */
            areturn
        end local 1 // java.util.Set closure
        end local 0 // jdk.internal.jshell.tool.JShellTool$1ComputeImports this
      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 // jdk.internal.jshell.tool.JShellTool$1ComputeImports this
        start local 1 // java.util.Optional omr
        start local 2 // java.util.Set closure
         0: .line 3085
            aload 1 /* omr */
            invokevirtual java.util.Optional.isPresent:()Z
            ifeq 8
         1: .line 3086
            aload 1 /* omr */
            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 /* mdesc */
        start local 3 // java.lang.module.ModuleDescriptor mdesc
         2: .line 3087
            aload 2 /* closure */
            aload 3 /* mdesc */
            invokeinterface java.util.Set.add:(Ljava/lang/Object;)Z
            ifeq 8
         3: .line 3088
            aload 3 /* mdesc */
            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 /* req */
        start local 4 // java.lang.module.ModuleDescriptor$Requires req
         5: .line 3089
            aload 4 /* req */
            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: .line 3090
            aload 0 /* this */
            aload 0 /* this */
            getfield jdk.internal.jshell.tool.JShellTool$1ComputeImports.finder:Ljava/lang/module/ModuleFinder;
            aload 4 /* req */
            invokevirtual java.lang.module.ModuleDescriptor$Requires.name:()Ljava/lang/String;
            invokeinterface java.lang.module.ModuleFinder.find:(Ljava/lang/String;)Ljava/util/Optional;
            aload 2 /* closure */
            invokevirtual jdk.internal.jshell.tool.JShellTool$1ComputeImports.moduleClosure:(Ljava/util/Optional;Ljava/util/Set;)V
        end local 4 // java.lang.module.ModuleDescriptor$Requires req
         7: .line 3088
      StackMap locals:
      StackMap stack:
            aload 5
            invokeinterface java.util.Iterator.hasNext:()Z
            ifne 4
        end local 3 // java.lang.module.ModuleDescriptor mdesc
         8: .line 3095
      StackMap locals: jdk.internal.jshell.tool.JShellTool$1ComputeImports java.util.Optional java.util.Set
      StackMap stack:
            return
        end local 2 // java.util.Set closure
        end local 1 // java.util.Optional omr
        end local 0 // jdk.internal.jshell.tool.JShellTool$1ComputeImports this
      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 // jdk.internal.jshell.tool.JShellTool$1ComputeImports this
         0: .line 3098
            aload 0 /* this */
            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: .line 3099
            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: .line 3098
            areturn
        end local 0 // jdk.internal.jshell.tool.JShellTool$1ComputeImports this
      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 // jdk.internal.jshell.tool.JShellTool$1ComputeImports this
         0: .line 3103
            aload 0 /* this */
            invokevirtual jdk.internal.jshell.tool.JShellTool$1ComputeImports.packages:()Ljava/util/Set;
            astore 1 /* si */
        start local 1 // java.util.Set si
         1: .line 3104
            aload 1 /* si */
            aload 1 /* si */
            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 /* ai */
        start local 2 // java.lang.String[] ai
         2: .line 3105
            aload 2 /* ai */
            invokestatic java.util.Arrays.sort:([Ljava/lang/Object;)V
         3: .line 3106
            aload 2 /* ai */
            invokestatic java.util.Arrays.stream:([Ljava/lang/Object;)Ljava/util/stream/Stream;
         4: .line 3107
            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: .line 3108
            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: .line 3106
            areturn
        end local 2 // java.lang.String[] ai
        end local 1 // java.util.Set si
        end local 0 // jdk.internal.jshell.tool.JShellTool$1ComputeImports this
      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 // java.lang.module.ModuleDescriptor md
         0: .line 3098
            aload 0 /* md */
            invokevirtual java.lang.module.ModuleDescriptor.exports:()Ljava/util/Set;
            invokeinterface java.util.Set.stream:()Ljava/util/stream/Stream;
            areturn
        end local 0 // java.lang.module.ModuleDescriptor md
      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 // java.lang.module.ModuleDescriptor$Exports e
         0: .line 3099
            aload 0 /* e */
            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 // java.lang.module.ModuleDescriptor$Exports e
      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 // java.lang.String p
         0: .line 3107
            ldc "import %s.*;\n"
            iconst_1
            anewarray java.lang.Object
            dup
            iconst_0
            aload 0 /* p */
            aastore
            invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
            areturn
        end local 0 // java.lang.String p
      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