public class org.glassfish.grizzly.http.server.util.ClassLoaderUtil
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.glassfish.grizzly.http.server.util.ClassLoaderUtil
super_class: java.lang.Object
{
private static final java.util.logging.Logger LOGGER;
descriptor: Ljava/util/logging/Logger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc Lorg/glassfish/grizzly/http/server/util/ClassLoaderUtil;
invokestatic org.glassfish.grizzly.Grizzly.logger:(Ljava/lang/Class;)Ljava/util/logging/Logger;
putstatic org.glassfish.grizzly.http.server.util.ClassLoaderUtil.LOGGER:Ljava/util/logging/Logger;
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
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 Lorg/glassfish/grizzly/http/server/util/ClassLoaderUtil;
public static java.lang.ClassLoader createClassloader(java.io.File, java.lang.ClassLoader);
descriptor: (Ljava/io/File;Ljava/lang/ClassLoader;)Ljava/lang/ClassLoader;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=7, args_size=2
start local 0 start local 1 0: aconst_null
astore 2
start local 2 1: aload 0
invokevirtual java.io.File.exists:()Z
ifeq 12
2: aload 0
invokevirtual java.io.File.isDirectory:()Z
ifeq 12
3: aload 0
new org.glassfish.grizzly.http.server.util.ClassLoaderUtil$1
dup
invokespecial org.glassfish.grizzly.http.server.util.ClassLoaderUtil$1.<init>:()V
invokevirtual java.io.File.list:(Ljava/io/FilenameFilter;)[Ljava/lang/String;
astore 3
start local 3 4: aload 3
arraylength
anewarray java.net.URL
astore 4
start local 4 5: iconst_0
istore 5
start local 5 6: goto 10
7: StackMap locals: java.io.File java.lang.ClassLoader java.net.URLClassLoader java.lang.String[] java.net.URL[] int
StackMap stack:
new java.io.File
dup
new java.lang.StringBuilder
dup
aload 0
invokevirtual java.io.File.getName:()Ljava/lang/String;
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
getstatic java.io.File.separator:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 3
iload 5
aaload
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
invokevirtual java.io.File.getCanonicalFile:()Ljava/io/File;
invokevirtual java.io.File.toURI:()Ljava/net/URI;
invokevirtual java.net.URI.toURL:()Ljava/net/URL;
invokevirtual java.net.URL.toString:()Ljava/lang/String;
astore 6
start local 6 8: aload 4
iload 5
new java.net.URL
dup
aload 6
invokespecial java.net.URL.<init>:(Ljava/lang/String;)V
aastore
end local 6 9: iinc 5 1
StackMap locals:
StackMap stack:
10: iload 5
aload 3
arraylength
if_icmplt 7
end local 5 11: aload 4
aload 1
invokestatic org.glassfish.grizzly.http.server.util.ClassLoaderUtil.createClassLoaderWithSecCheck:([Ljava/net/URL;Ljava/lang/ClassLoader;)Ljava/net/URLClassLoader;
astore 2
end local 4 end local 3 12: StackMap locals:
StackMap stack:
aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 libDir Ljava/io/File;
0 13 1 cl Ljava/lang/ClassLoader;
1 13 2 urlClassloader Ljava/net/URLClassLoader;
4 12 3 jars [Ljava/lang/String;
5 12 4 urls [Ljava/net/URL;
6 11 5 i I
8 9 6 path Ljava/lang/String;
Exceptions:
throws java.io.IOException
RuntimeVisibleAnnotations:
java.lang.Deprecated()
MethodParameters:
Name Flags
libDir
cl
public static java.net.URLClassLoader createURLClassLoader(java.lang.String);
descriptor: (Ljava/lang/String;)Ljava/net/URLClassLoader;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=8, locals=11, args_size=1
start local 0 0: aload 0
getstatic java.io.File.separator:Ljava/lang/String;
invokevirtual java.lang.String.endsWith:(Ljava/lang/String;)Z
ifne 2
aload 0
ldc ".war"
invokevirtual java.lang.String.endsWith:(Ljava/lang/String;)Z
ifne 2
aload 0
ldc ".jar"
invokevirtual java.lang.String.endsWith:(Ljava/lang/String;)Z
ifne 2
1: new java.lang.StringBuilder
dup
aload 0
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
getstatic java.io.File.separator:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 0
2: StackMap locals:
StackMap stack:
ldc "os.name"
invokestatic java.lang.System.getProperty:(Ljava/lang/String;)Ljava/lang/String;
invokevirtual java.lang.String.toLowerCase:()Ljava/lang/String;
ldc "win"
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifeq 3
ldc "/"
goto 4
StackMap locals:
StackMap stack:
3: ldc "//"
StackMap locals:
StackMap stack: java.lang.String
4: astore 5
start local 5 5: aload 0
ifnull 11
aload 0
ldc ".war"
invokevirtual java.lang.String.endsWith:(Ljava/lang/String;)Z
ifne 6
aload 0
ldc ".jar"
invokevirtual java.lang.String.endsWith:(Ljava/lang/String;)Z
ifeq 11
6: StackMap locals: java.lang.String top top top top java.lang.String
StackMap stack:
new java.io.File
dup
aload 0
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
astore 2
start local 2 7: new java.net.URL
dup
new java.lang.StringBuilder
dup
ldc "jar:file:"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 5
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 2
invokevirtual java.io.File.getCanonicalPath:()Ljava/lang/String;
bipush 92
bipush 47
invokevirtual java.lang.String.replace:(CC)Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "!/"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.net.URL.<init>:(Ljava/lang/String;)V
astore 3
start local 3 8: new java.net.URL
dup
new java.lang.StringBuilder
dup
ldc "jar:file:"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 5
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 2
invokevirtual java.io.File.getCanonicalPath:()Ljava/lang/String;
bipush 92
bipush 47
invokevirtual java.lang.String.replace:(CC)Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "!/WEB-INF/classes/"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.net.URL.<init>:(Ljava/lang/String;)V
astore 4
start local 4 9: aload 3
invokestatic org.glassfish.grizzly.http.server.util.ExpandJar.expand:(Ljava/net/URL;)Ljava/lang/String;
astore 1
start local 1 10: goto 14
end local 4 end local 3 end local 2 end local 1 11: StackMap locals:
StackMap stack:
aload 0
astore 1
start local 1 12: new java.net.URL
dup
new java.lang.StringBuilder
dup
ldc "file://"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "WEB-INF/classes/"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.net.URL.<init>:(Ljava/lang/String;)V
astore 4
start local 4 13: new java.net.URL
dup
new java.lang.StringBuilder
dup
ldc "file://"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.net.URL.<init>:(Ljava/lang/String;)V
astore 3
start local 3 14: StackMap locals: java.lang.String java.lang.String top java.net.URL java.net.URL java.lang.String
StackMap stack:
new java.io.File
dup
aload 1
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
invokevirtual java.io.File.getAbsolutePath:()Ljava/lang/String;
astore 6
start local 6 15: new java.io.File
dup
new java.lang.StringBuilder
dup
aload 6
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
getstatic java.io.File.separator:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "WEB-INF"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
getstatic java.io.File.separator:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "lib"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
astore 8
start local 8 16: iconst_4
istore 9
start local 9 17: aload 8
invokevirtual java.io.File.exists:()Z
ifeq 25
aload 8
invokevirtual java.io.File.isDirectory:()Z
ifeq 25
18: aload 8
invokevirtual java.io.File.listFiles:()[Ljava/io/File;
arraylength
iload 9
iadd
anewarray java.net.URL
astore 7
start local 7 19: iconst_0
istore 10
start local 10 20: goto 23
21: StackMap locals: java.lang.String java.lang.String top java.net.URL java.net.URL java.lang.String java.lang.String java.net.URL[] java.io.File int int
StackMap stack:
aload 7
iload 10
new java.net.URL
dup
new java.lang.StringBuilder
dup
ldc "jar:file:"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 5
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 8
invokevirtual java.io.File.listFiles:()[Ljava/io/File;
iload 10
aaload
invokevirtual java.io.File.toString:()Ljava/lang/String;
bipush 92
bipush 47
invokevirtual java.lang.String.replace:(CC)Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "!/"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.net.URL.<init>:(Ljava/lang/String;)V
aastore
22: iinc 10 1
StackMap locals:
StackMap stack:
23: iload 10
aload 8
invokevirtual java.io.File.listFiles:()[Ljava/io/File;
arraylength
if_icmplt 21
end local 10 24: goto 26
end local 7 25: StackMap locals: java.lang.String java.lang.String top java.net.URL java.net.URL java.lang.String java.lang.String top java.io.File int
StackMap stack:
iload 9
anewarray java.net.URL
astore 7
start local 7 26: StackMap locals: java.lang.String java.lang.String top java.net.URL java.net.URL java.lang.String java.lang.String java.net.URL[] java.io.File int
StackMap stack:
aload 7
aload 7
arraylength
iconst_1
isub
aload 4
aastore
27: aload 7
aload 7
arraylength
iconst_2
isub
aload 3
aastore
28: aload 7
aload 7
arraylength
iconst_3
isub
new java.net.URL
dup
new java.lang.StringBuilder
dup
ldc "file://"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "/WEB-INF/classes/"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.net.URL.<init>:(Ljava/lang/String;)V
aastore
29: aload 7
aload 7
arraylength
iconst_4
isub
new java.net.URL
dup
new java.lang.StringBuilder
dup
ldc "file://"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.net.URL.<init>:(Ljava/lang/String;)V
aastore
30: aload 7
invokestatic java.lang.Thread.currentThread:()Ljava/lang/Thread;
invokevirtual java.lang.Thread.getContextClassLoader:()Ljava/lang/ClassLoader;
invokestatic org.glassfish.grizzly.http.server.util.ClassLoaderUtil.createClassLoaderWithSecCheck:([Ljava/net/URL;Ljava/lang/ClassLoader;)Ljava/net/URLClassLoader;
areturn
end local 9 end local 8 end local 7 end local 6 end local 5 end local 4 end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 31 0 dirPath Ljava/lang/String;
10 11 1 path Ljava/lang/String;
12 31 1 path Ljava/lang/String;
7 11 2 file Ljava/io/File;
8 11 3 appRoot Ljava/net/URL;
14 31 3 appRoot Ljava/net/URL;
9 11 4 classesURL Ljava/net/URL;
13 31 4 classesURL Ljava/net/URL;
5 31 5 separator Ljava/lang/String;
15 31 6 absolutePath Ljava/lang/String;
19 25 7 urls [Ljava/net/URL;
26 31 7 urls [Ljava/net/URL;
16 31 8 libFiles Ljava/io/File;
17 31 9 arraySize I
20 24 10 i I
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
dirPath
public static java.net.URLClassLoader createURLClassLoader(java.lang.String, java.lang.ClassLoader);
descriptor: (Ljava/lang/String;Ljava/lang/ClassLoader;)Ljava/net/URLClassLoader;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=5, args_size=2
start local 0 start local 1 0: invokestatic java.lang.Thread.currentThread:()Ljava/lang/Thread;
invokevirtual java.lang.Thread.getContextClassLoader:()Ljava/lang/ClassLoader;
astore 2
start local 2 1: invokestatic java.lang.Thread.currentThread:()Ljava/lang/Thread;
aload 1
invokevirtual java.lang.Thread.setContextClassLoader:(Ljava/lang/ClassLoader;)V
2: aload 0
invokestatic org.glassfish.grizzly.http.server.util.ClassLoaderUtil.createURLClassLoader:(Ljava/lang/String;)Ljava/net/URLClassLoader;
astore 4
3: invokestatic java.lang.Thread.currentThread:()Ljava/lang/Thread;
aload 2
invokevirtual java.lang.Thread.setContextClassLoader:(Ljava/lang/ClassLoader;)V
4: aload 4
areturn
5: StackMap locals: java.lang.String java.lang.ClassLoader java.lang.ClassLoader
StackMap stack: java.lang.Throwable
astore 3
6: invokestatic java.lang.Thread.currentThread:()Ljava/lang/Thread;
aload 2
invokevirtual java.lang.Thread.setContextClassLoader:(Ljava/lang/ClassLoader;)V
7: aload 3
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 location Ljava/lang/String;
0 8 1 parent Ljava/lang/ClassLoader;
1 8 2 loader Ljava/lang/ClassLoader;
Exception table:
from to target type
2 3 5 any
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
location
parent
public static java.lang.Object load(java.lang.String);
descriptor: (Ljava/lang/String;)Ljava/lang/Object;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokestatic java.lang.Thread.currentThread:()Ljava/lang/Thread;
invokevirtual java.lang.Thread.getContextClassLoader:()Ljava/lang/ClassLoader;
invokestatic org.glassfish.grizzly.http.server.util.ClassLoaderUtil.load:(Ljava/lang/String;Ljava/lang/ClassLoader;)Ljava/lang/Object;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 clazzName Ljava/lang/String;
MethodParameters:
Name Flags
clazzName
public static java.lang.Object load(java.lang.String, java.lang.ClassLoader);
descriptor: (Ljava/lang/String;Ljava/lang/ClassLoader;)Ljava/lang/Object;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=4, args_size=2
start local 0 start local 1 0: aload 0
iconst_1
aload 1
invokestatic java.lang.Class.forName:(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;
astore 2
start local 2 1: aload 2
invokevirtual java.lang.Class.newInstance:()Ljava/lang/Object;
2: areturn
end local 2 3: StackMap locals:
StackMap stack: java.lang.Throwable
astore 3
start local 3 4: getstatic org.glassfish.grizzly.http.server.util.ClassLoaderUtil.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.SEVERE:Ljava/util/logging/Level;
new java.lang.StringBuilder
dup
ldc "Unable to load class "
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;
aload 3
invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
end local 3 5: aconst_null
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 clazzName Ljava/lang/String;
0 6 1 classLoader Ljava/lang/ClassLoader;
1 3 2 className Ljava/lang/Class;
4 5 3 t Ljava/lang/Throwable;
Exception table:
from to target type
0 2 3 Class java.lang.Throwable
MethodParameters:
Name Flags
clazzName
classLoader
private static java.net.URLClassLoader createClassLoaderWithSecCheck(java.net.URL[], java.lang.ClassLoader);
descriptor: ([Ljava/net/URL;Ljava/lang/ClassLoader;)Ljava/net/URLClassLoader;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: invokestatic java.lang.System.getSecurityManager:()Ljava/lang/SecurityManager;
ifnonnull 2
1: new java.net.URLClassLoader
dup
aload 0
aload 1
invokespecial java.net.URLClassLoader.<init>:([Ljava/net/URL;Ljava/lang/ClassLoader;)V
areturn
2: StackMap locals:
StackMap stack:
new org.glassfish.grizzly.http.server.util.ClassLoaderUtil$2
dup
aload 0
aload 1
invokespecial org.glassfish.grizzly.http.server.util.ClassLoaderUtil$2.<init>:([Ljava/net/URL;Ljava/lang/ClassLoader;)V
invokestatic java.security.AccessController.doPrivileged:(Ljava/security/PrivilegedAction;)Ljava/lang/Object;
checkcast java.net.URLClassLoader
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 urls [Ljava/net/URL;
0 3 1 parent Ljava/lang/ClassLoader;
MethodParameters:
Name Flags
urls final
parent final
}
SourceFile: "ClassLoaderUtil.java"
NestMembers:
org.glassfish.grizzly.http.server.util.ClassLoaderUtil$1 org.glassfish.grizzly.http.server.util.ClassLoaderUtil$2
InnerClasses:
org.glassfish.grizzly.http.server.util.ClassLoaderUtil$1
org.glassfish.grizzly.http.server.util.ClassLoaderUtil$2