public class io.dropwizard.util.JarLocation
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: io.dropwizard.util.JarLocation
super_class: java.lang.Object
{
private final java.lang.Class<?> klass;
descriptor: Ljava/lang/Class;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/lang/Class<*>;
public void <init>(java.lang.Class<?>);
descriptor: (Ljava/lang/Class;)V
flags: (0x0001) ACC_PUBLIC
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
aload 1
putfield io.dropwizard.util.JarLocation.klass:Ljava/lang/Class;
2: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lio/dropwizard/util/JarLocation;
0 3 1 klass Ljava/lang/Class<*>;
Signature: (Ljava/lang/Class<*>;)V
MethodParameters:
Name Flags
klass
public java.util.Optional<java.lang.String> getVersion();
descriptor: ()Ljava/util/Optional;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield io.dropwizard.util.JarLocation.klass:Ljava/lang/Class;
invokevirtual java.lang.Class.getPackage:()Ljava/lang/Package;
invokestatic java.util.Optional.ofNullable:(Ljava/lang/Object;)Ljava/util/Optional;
1: 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/Package.getImplementationVersion()Ljava/lang/String; (5)
(Ljava/lang/Package;)Ljava/lang/String;
invokevirtual java.util.Optional.map:(Ljava/util/function/Function;)Ljava/util/Optional;
2: areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lio/dropwizard/util/JarLocation;
Signature: ()Ljava/util/Optional<Ljava/lang/String;>;
public java.lang.String toString();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=1
start local 0 0: aload 0
getfield io.dropwizard.util.JarLocation.klass:Ljava/lang/Class;
invokevirtual java.lang.Class.getProtectionDomain:()Ljava/security/ProtectionDomain;
invokevirtual java.security.ProtectionDomain.getCodeSource:()Ljava/security/CodeSource;
invokevirtual java.security.CodeSource.getLocation:()Ljava/net/URL;
astore 1
start local 1 1: new java.io.File
dup
aload 1
invokevirtual java.net.URL.toURI:()Ljava/net/URI;
invokespecial java.io.File.<init>:(Ljava/net/URI;)V
invokevirtual java.io.File.getName:()Ljava/lang/String;
astore 2
start local 2 2: aload 2
ldc ".jar"
invokevirtual java.lang.String.endsWith:(Ljava/lang/String;)Z
ifeq 5
3: aload 2
4: areturn
5: StackMap locals: java.net.URL java.lang.String
StackMap stack:
ldc "project.jar"
areturn
end local 2 6: StackMap locals: io.dropwizard.util.JarLocation java.net.URL
StackMap stack: java.lang.Exception
pop
7: ldc "project.jar"
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lio/dropwizard/util/JarLocation;
1 8 1 location Ljava/net/URL;
2 6 2 jar Ljava/lang/String;
Exception table:
from to target type
1 4 6 Class java.lang.Exception
}
SourceFile: "JarLocation.java"
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles