public final class jdk.internal.foreign.LibrariesHelper
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: jdk.internal.foreign.LibrariesHelper
super_class: java.lang.Object
{
private static final jdk.internal.loader.NativeLibraries nativeLibraries;
descriptor: Ljdk/internal/loader/NativeLibraries;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final java.util.Map<jdk.internal.loader.NativeLibrary, java.util.concurrent.atomic.AtomicInteger> loadedLibraries;
descriptor: Ljava/util/Map;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
Signature: Ljava/util/Map<Ljdk/internal/loader/NativeLibrary;Ljava/util/concurrent/atomic/AtomicInteger;>;
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: ldc Ljdk/internal/foreign/LibrariesHelper;
iconst_1
invokestatic jdk.internal.loader.NativeLibraries.rawNativeLibraries:(Ljava/lang/Class;Z)Ljdk/internal/loader/NativeLibraries;
1: putstatic jdk.internal.foreign.LibrariesHelper.nativeLibraries:Ljdk/internal/loader/NativeLibraries;
2: new java.util.IdentityHashMap
dup
invokespecial java.util.IdentityHashMap.<init>:()V
putstatic jdk.internal.foreign.LibrariesHelper.loadedLibraries:Ljava/util/Map;
return
LocalVariableTable:
Start End Slot Name Signature
private void <init>();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
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/foreign/LibrariesHelper;
public static jdk.incubator.foreign.LibraryLookup loadLibrary(java.lang.String);
descriptor: (Ljava/lang/String;)Ljdk/incubator/foreign/LibraryLookup;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=1, args_size=1
start local 0 0: aload 0
invokedynamic get(Ljava/lang/String;)Ljava/util/function/Supplier;
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;
jdk/internal/foreign/LibrariesHelper.lambda$0(Ljava/lang/String;)Ljdk/internal/loader/NativeLibrary; (6)
()Ljdk/internal/loader/NativeLibrary;
1: new java.lang.StringBuilder
dup
ldc "Library not found: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
2: invokestatic jdk.internal.foreign.LibrariesHelper.lookup:(Ljava/util/function/Supplier;Ljava/lang/String;)Ljdk/internal/foreign/LibrariesHelper$LibraryLookupImpl;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 name Ljava/lang/String;
MethodParameters:
Name Flags
name
public static jdk.incubator.foreign.LibraryLookup load(java.lang.String);
descriptor: (Ljava/lang/String;)Ljdk/incubator/foreign/LibraryLookup;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=2, args_size=1
start local 0 0: new java.io.File
dup
aload 0
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
astore 1
start local 1 1: aload 1
invokevirtual java.io.File.isAbsolute:()Z
ifne 5
2: new java.lang.UnsatisfiedLinkError
dup
3: new java.lang.StringBuilder
dup
ldc "Expecting an absolute path of the library: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
4: invokespecial java.lang.UnsatisfiedLinkError.<init>:(Ljava/lang/String;)V
athrow
5: StackMap locals: java.io.File
StackMap stack:
aload 1
invokedynamic get(Ljava/io/File;)Ljava/util/function/Supplier;
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;
jdk/internal/foreign/LibrariesHelper.lambda$1(Ljava/io/File;)Ljdk/internal/loader/NativeLibrary; (6)
()Ljdk/internal/loader/NativeLibrary;
6: new java.lang.StringBuilder
dup
ldc "Library not found: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
7: invokestatic jdk.internal.foreign.LibrariesHelper.lookup:(Ljava/util/function/Supplier;Ljava/lang/String;)Ljdk/internal/foreign/LibrariesHelper$LibraryLookupImpl;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 path Ljava/lang/String;
1 8 1 file Ljava/io/File;
MethodParameters:
Name Flags
path
private static java.util.Optional<java.nio.file.Path> findLibraryPath(java.nio.file.Path[], java.lang.String);
descriptor: ([Ljava/nio/file/Path;Ljava/lang/String;)Ljava/util/Optional;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokestatic java.util.Arrays.stream:([Ljava/lang/Object;)Ljava/util/stream/Stream;
1: aload 1
invokedynamic apply(Ljava/lang/String;)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/foreign/LibrariesHelper.lambda$2(Ljava/lang/String;Ljava/nio/file/Path;)Ljava/nio/file/Path; (6)
(Ljava/nio/file/Path;)Ljava/nio/file/Path;
invokeinterface java.util.stream.Stream.map:(Ljava/util/function/Function;)Ljava/util/stream/Stream;
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/foreign/LibrariesHelper.lambda$7(Ljava/nio/file/Path;)Z (6)
(Ljava/nio/file/Path;)Z
2: 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/nio/file/Path.toAbsolutePath()Ljava/nio/file/Path; (9 itf)
(Ljava/nio/file/Path;)Ljava/nio/file/Path;
invokeinterface java.util.stream.Stream.map:(Ljava/util/function/Function;)Ljava/util/stream/Stream;
invokeinterface java.util.stream.Stream.findFirst:()Ljava/util/Optional;
3: areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 paths [Ljava/nio/file/Path;
0 4 1 libName Ljava/lang/String;
Signature: ([Ljava/nio/file/Path;Ljava/lang/String;)Ljava/util/Optional<Ljava/nio/file/Path;>;
MethodParameters:
Name Flags
paths
libName
public static jdk.incubator.foreign.LibraryLookup getDefaultLibrary();
descriptor: ()Ljdk/incubator/foreign/LibraryLookup;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: getstatic jdk.internal.foreign.LibrariesHelper$LibraryLookupImpl.DEFAULT_LOOKUP:Ljdk/incubator/foreign/LibraryLookup;
areturn
LocalVariableTable:
Start End Slot Name Signature
static synchronized jdk.internal.foreign.LibrariesHelper$LibraryLookupImpl lookup(java.util.function.Supplier<jdk.internal.loader.NativeLibrary>, java.lang.String);
descriptor: (Ljava/util/function/Supplier;Ljava/lang/String;)Ljdk/internal/foreign/LibrariesHelper$LibraryLookupImpl;
flags: (0x0028) ACC_STATIC, ACC_SYNCHRONIZED
Code:
stack=3, locals=5, args_size=2
start local 0 start local 1 0: aload 0
invokeinterface java.util.function.Supplier.get:()Ljava/lang/Object;
checkcast jdk.internal.loader.NativeLibrary
astore 2
start local 2 1: aload 2
ifnonnull 3
2: new java.lang.IllegalArgumentException
dup
aload 1
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals: jdk.internal.loader.NativeLibrary
StackMap stack:
getstatic jdk.internal.foreign.LibrariesHelper.loadedLibraries:Ljava/util/Map;
aload 2
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/foreign/LibrariesHelper.lambda$5(Ljdk/internal/loader/NativeLibrary;)Ljava/util/concurrent/atomic/AtomicInteger; (6)
(Ljdk/internal/loader/NativeLibrary;)Ljava/util/concurrent/atomic/AtomicInteger;
invokeinterface java.util.Map.computeIfAbsent:(Ljava/lang/Object;Ljava/util/function/Function;)Ljava/lang/Object;
checkcast java.util.concurrent.atomic.AtomicInteger
astore 3
start local 3 4: aload 3
invokevirtual java.util.concurrent.atomic.AtomicInteger.incrementAndGet:()I
pop
5: new jdk.internal.foreign.LibrariesHelper$LibraryLookupImpl
dup
aload 2
invokespecial jdk.internal.foreign.LibrariesHelper$LibraryLookupImpl.<init>:(Ljdk/internal/loader/NativeLibrary;)V
astore 4
start local 4 6: invokestatic jdk.internal.ref.CleanerFactory.cleaner:()Ljava/lang/ref/Cleaner;
aload 4
aload 2
invokedynamic run(Ljdk/internal/loader/NativeLibrary;)Ljava/lang/Runnable;
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:
()V
jdk/internal/foreign/LibrariesHelper.lambda$6(Ljdk/internal/loader/NativeLibrary;)V (6)
()V
invokevirtual java.lang.ref.Cleaner.register:(Ljava/lang/Object;Ljava/lang/Runnable;)Ljava/lang/ref/Cleaner$Cleanable;
pop
7: aload 4
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 librarySupplier Ljava/util/function/Supplier<Ljdk/internal/loader/NativeLibrary;>;
0 8 1 notFoundMsg Ljava/lang/String;
1 8 2 library Ljdk/internal/loader/NativeLibrary;
4 8 3 refCount Ljava/util/concurrent/atomic/AtomicInteger;
6 8 4 lookup Ljdk/internal/foreign/LibrariesHelper$LibraryLookupImpl;
Signature: (Ljava/util/function/Supplier<Ljdk/internal/loader/NativeLibrary;>;Ljava/lang/String;)Ljdk/internal/foreign/LibrariesHelper$LibraryLookupImpl;
MethodParameters:
Name Flags
librarySupplier
notFoundMsg
static synchronized void tryUnload(jdk.internal.loader.NativeLibrary);
descriptor: (Ljdk/internal/loader/NativeLibrary;)V
flags: (0x0028) ACC_STATIC, ACC_SYNCHRONIZED
Code:
stack=2, locals=2, args_size=1
start local 0 0: getstatic jdk.internal.foreign.LibrariesHelper.loadedLibraries:Ljava/util/Map;
aload 0
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.util.concurrent.atomic.AtomicInteger
astore 1
start local 1 1: aload 1
invokevirtual java.util.concurrent.atomic.AtomicInteger.decrementAndGet:()I
ifne 4
2: getstatic jdk.internal.foreign.LibrariesHelper.loadedLibraries:Ljava/util/Map;
aload 0
invokeinterface java.util.Map.remove:(Ljava/lang/Object;)Ljava/lang/Object;
pop
3: getstatic jdk.internal.foreign.LibrariesHelper.nativeLibraries:Ljdk/internal/loader/NativeLibraries;
aload 0
invokevirtual jdk.internal.loader.NativeLibraries.unload:(Ljdk/internal/loader/NativeLibrary;)V
4: StackMap locals: java.util.concurrent.atomic.AtomicInteger
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 library Ljdk/internal/loader/NativeLibrary;
1 5 1 refCount Ljava/util/concurrent/atomic/AtomicInteger;
MethodParameters:
Name Flags
library
public static int numLoadedLibraries();
descriptor: ()I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: getstatic jdk.internal.foreign.LibrariesHelper.loadedLibraries:Ljava/util/Map;
invokeinterface java.util.Map.size:()I
ireturn
LocalVariableTable:
Start End Slot Name Signature
private static jdk.internal.loader.NativeLibrary lambda$0(java.lang.String);
descriptor: (Ljava/lang/String;)Ljdk/internal/loader/NativeLibrary;
flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=3, locals=1, args_size=1
0: getstatic jdk.internal.foreign.LibrariesHelper.nativeLibraries:Ljdk/internal/loader/NativeLibraries;
ldc Ljdk/internal/foreign/LibrariesHelper;
aload 0
invokevirtual jdk.internal.loader.NativeLibraries.loadLibrary:(Ljava/lang/Class;Ljava/lang/String;)Ljdk/internal/loader/NativeLibrary;
areturn
LocalVariableTable:
Start End Slot Name Signature
private static jdk.internal.loader.NativeLibrary lambda$1(java.io.File);
descriptor: (Ljava/io/File;)Ljdk/internal/loader/NativeLibrary;
flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=3, locals=1, args_size=1
0: getstatic jdk.internal.foreign.LibrariesHelper.nativeLibraries:Ljdk/internal/loader/NativeLibraries;
ldc Ljdk/internal/foreign/LibrariesHelper;
aload 0
invokevirtual jdk.internal.loader.NativeLibraries.loadLibrary:(Ljava/lang/Class;Ljava/io/File;)Ljdk/internal/loader/NativeLibrary;
areturn
LocalVariableTable:
Start End Slot Name Signature
private static java.nio.file.Path lambda$2(java.lang.String, java.nio.file.Path);
descriptor: (Ljava/lang/String;Ljava/nio/file/Path;)Ljava/nio/file/Path;
flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=2, locals=2, args_size=2
start local 1 0: aload 1
aload 0
invokestatic java.lang.System.mapLibraryName:(Ljava/lang/String;)Ljava/lang/String;
invokeinterface java.nio.file.Path.resolve:(Ljava/lang/String;)Ljava/nio/file/Path;
areturn
end local 1 LocalVariableTable:
Start End Slot Name Signature
0 1 1 p Ljava/nio/file/Path;
private static boolean lambda$7(java.nio.file.Path);
descriptor: (Ljava/nio/file/Path;)Z
flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
iconst_0
anewarray java.nio.file.LinkOption
invokestatic java.nio.file.Files.isRegularFile:(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 arg0 Ljava/nio/file/Path;
private static java.util.concurrent.atomic.AtomicInteger lambda$5(jdk.internal.loader.NativeLibrary);
descriptor: (Ljdk/internal/loader/NativeLibrary;)Ljava/util/concurrent/atomic/AtomicInteger;
flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: new java.util.concurrent.atomic.AtomicInteger
dup
invokespecial java.util.concurrent.atomic.AtomicInteger.<init>:()V
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 lib Ljdk/internal/loader/NativeLibrary;
private static void lambda$6(jdk.internal.loader.NativeLibrary);
descriptor: (Ljdk/internal/loader/NativeLibrary;)V
flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=1, locals=1, args_size=1
0: aload 0
invokestatic jdk.internal.foreign.LibrariesHelper.tryUnload:(Ljdk/internal/loader/NativeLibrary;)V
return
LocalVariableTable:
Start End Slot Name Signature
}
SourceFile: "LibrariesHelper.java"
NestMembers:
jdk.internal.foreign.LibrariesHelper$LibraryLookupImpl jdk.internal.foreign.LibrariesHelper$LibraryLookupImpl$1
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles
public abstract Cleanable = java.lang.ref.Cleaner$Cleanable of java.lang.ref.Cleaner
LibraryLookupImpl = jdk.internal.foreign.LibrariesHelper$LibraryLookupImpl of jdk.internal.foreign.LibrariesHelper