public class sun.jvm.hotspot.tools.jcore.ClassDump extends sun.jvm.hotspot.tools.Tool
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: sun.jvm.hotspot.tools.jcore.ClassDump
super_class: sun.jvm.hotspot.tools.Tool
{
private sun.jvm.hotspot.tools.jcore.ClassFilter classFilter;
descriptor: Lsun/jvm/hotspot/tools/jcore/ClassFilter;
flags: (0x0002) ACC_PRIVATE
private java.lang.String outputDirectory;
descriptor: Ljava/lang/String;
flags: (0x0002) ACC_PRIVATE
private java.util.jar.JarOutputStream jarStream;
descriptor: Ljava/util/jar/JarOutputStream;
flags: (0x0002) ACC_PRIVATE
private java.lang.String pkgList;
descriptor: Ljava/lang/String;
flags: (0x0002) ACC_PRIVATE
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial sun.jvm.hotspot.tools.Tool.<init>:()V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lsun/jvm/hotspot/tools/jcore/ClassDump;
public void <init>(sun.jvm.hotspot.debugger.JVMDebugger, java.lang.String);
descriptor: (Lsun/jvm/hotspot/debugger/JVMDebugger;Ljava/lang/String;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
invokespecial sun.jvm.hotspot.tools.Tool.<init>:(Lsun/jvm/hotspot/debugger/JVMDebugger;)V
1: aload 0
aload 2
putfield sun.jvm.hotspot.tools.jcore.ClassDump.pkgList:Ljava/lang/String;
2: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lsun/jvm/hotspot/tools/jcore/ClassDump;
0 3 1 d Lsun/jvm/hotspot/debugger/JVMDebugger;
0 3 2 pkgList Ljava/lang/String;
MethodParameters:
Name Flags
d
pkgList
public void setClassFilter(sun.jvm.hotspot.tools.jcore.ClassFilter);
descriptor: (Lsun/jvm/hotspot/tools/jcore/ClassFilter;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
putfield sun.jvm.hotspot.tools.jcore.ClassDump.classFilter:Lsun/jvm/hotspot/tools/jcore/ClassFilter;
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lsun/jvm/hotspot/tools/jcore/ClassDump;
0 2 1 cf Lsun/jvm/hotspot/tools/jcore/ClassFilter;
MethodParameters:
Name Flags
cf
public void setOutputDirectory(java.lang.String);
descriptor: (Ljava/lang/String;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=3, args_size=2
start local 0 start local 1 0: aload 0
aload 1
putfield sun.jvm.hotspot.tools.jcore.ClassDump.outputDirectory:Ljava/lang/String;
1: aload 0
getfield sun.jvm.hotspot.tools.jcore.ClassDump.jarStream:Ljava/util/jar/JarOutputStream;
ifnull 6
2: aload 0
getfield sun.jvm.hotspot.tools.jcore.ClassDump.jarStream:Ljava/util/jar/JarOutputStream;
invokevirtual java.util.jar.JarOutputStream.close:()V
3: goto 6
StackMap locals:
StackMap stack: java.io.IOException
4: astore 2
start local 2 5: aload 2
invokevirtual java.io.IOException.printStackTrace:()V
end local 2 6: StackMap locals:
StackMap stack:
aload 0
aconst_null
putfield sun.jvm.hotspot.tools.jcore.ClassDump.jarStream:Ljava/util/jar/JarOutputStream;
7: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lsun/jvm/hotspot/tools/jcore/ClassDump;
0 8 1 od Ljava/lang/String;
5 6 2 ioe Ljava/io/IOException;
Exception table:
from to target type
2 3 4 Class java.io.IOException
MethodParameters:
Name Flags
od
public void setJarOutput(java.lang.String);
descriptor: (Ljava/lang/String;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=2, args_size=2
start local 0 start local 1 0: aload 0
new java.util.jar.JarOutputStream
dup
new java.io.FileOutputStream
dup
aload 1
invokespecial java.io.FileOutputStream.<init>:(Ljava/lang/String;)V
new java.util.jar.Manifest
dup
invokespecial java.util.jar.Manifest.<init>:()V
invokespecial java.util.jar.JarOutputStream.<init>:(Ljava/io/OutputStream;Ljava/util/jar/Manifest;)V
putfield sun.jvm.hotspot.tools.jcore.ClassDump.jarStream:Ljava/util/jar/JarOutputStream;
1: aload 0
aconst_null
putfield sun.jvm.hotspot.tools.jcore.ClassDump.outputDirectory:Ljava/lang/String;
2: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lsun/jvm/hotspot/tools/jcore/ClassDump;
0 3 1 jarFileName Ljava/lang/String;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
jarFileName
public void run();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=4, args_size=1
start local 0 0: aload 0
getfield sun.jvm.hotspot.tools.jcore.ClassDump.classFilter:Lsun/jvm/hotspot/tools/jcore/ClassFilter;
ifnonnull 13
1: ldc "sun.jvm.hotspot.tools.jcore.filter"
2: ldc "sun.jvm.hotspot.tools.jcore.PackageNameFilter"
3: invokestatic java.lang.System.getProperty:(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
astore 1
start local 1 4: aload 1
invokestatic java.lang.Class.forName:(Ljava/lang/String;)Ljava/lang/Class;
astore 2
start local 2 5: aload 0
getfield sun.jvm.hotspot.tools.jcore.ClassDump.pkgList:Ljava/lang/String;
ifnonnull 8
6: aload 0
aload 2
invokevirtual java.lang.Class.newInstance:()Ljava/lang/Object;
checkcast sun.jvm.hotspot.tools.jcore.ClassFilter
putfield sun.jvm.hotspot.tools.jcore.ClassDump.classFilter:Lsun/jvm/hotspot/tools/jcore/ClassFilter;
7: goto 13
8: StackMap locals: java.lang.String java.lang.Class
StackMap stack:
aload 2
iconst_1
anewarray java.lang.Class
dup
iconst_0
ldc Ljava/lang/String;
aastore
invokevirtual java.lang.Class.getConstructor:([Ljava/lang/Class;)Ljava/lang/reflect/Constructor;
astore 3
start local 3 9: aload 0
aload 3
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 0
getfield sun.jvm.hotspot.tools.jcore.ClassDump.pkgList:Ljava/lang/String;
aastore
invokevirtual java.lang.reflect.Constructor.newInstance:([Ljava/lang/Object;)Ljava/lang/Object;
checkcast sun.jvm.hotspot.tools.jcore.ClassFilter
putfield sun.jvm.hotspot.tools.jcore.ClassDump.classFilter:Lsun/jvm/hotspot/tools/jcore/ClassFilter;
end local 3 end local 2 10: goto 13
StackMap locals: sun.jvm.hotspot.tools.jcore.ClassDump java.lang.String
StackMap stack: java.lang.Exception
11: pop
12: getstatic java.lang.System.err:Ljava/io/PrintStream;
ldc "Warning: Can not create class filter!"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
end local 1 13: StackMap locals:
StackMap stack:
aload 0
getfield sun.jvm.hotspot.tools.jcore.ClassDump.outputDirectory:Ljava/lang/String;
ifnonnull 16
aload 0
getfield sun.jvm.hotspot.tools.jcore.ClassDump.jarStream:Ljava/util/jar/JarOutputStream;
ifnonnull 16
14: ldc "sun.jvm.hotspot.tools.jcore.outputDir"
ldc "."
invokestatic java.lang.System.getProperty:(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
astore 1
start local 1 15: aload 0
aload 1
invokevirtual sun.jvm.hotspot.tools.jcore.ClassDump.setOutputDirectory:(Ljava/lang/String;)V
end local 1 16: StackMap locals:
StackMap stack:
invokestatic sun.jvm.hotspot.runtime.VM.getVM:()Lsun/jvm/hotspot/runtime/VM;
invokevirtual sun.jvm.hotspot.runtime.VM.getClassLoaderDataGraph:()Lsun/jvm/hotspot/classfile/ClassLoaderDataGraph;
astore 1
start local 1 17: aload 1
new sun.jvm.hotspot.tools.jcore.ClassDump$1
dup
aload 0
invokespecial sun.jvm.hotspot.tools.jcore.ClassDump$1.<init>:(Lsun/jvm/hotspot/tools/jcore/ClassDump;)V
invokevirtual sun.jvm.hotspot.classfile.ClassLoaderDataGraph.classesDo:(Lsun/jvm/hotspot/classfile/ClassLoaderDataGraph$ClassVisitor;)V
end local 1 18: goto 24
19: StackMap locals:
StackMap stack: sun.jvm.hotspot.debugger.AddressException
astore 1
start local 1 20: getstatic java.lang.System.err:Ljava/io/PrintStream;
new java.lang.StringBuilder
dup
ldc "Error accessing address 0x"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
21: aload 1
invokevirtual sun.jvm.hotspot.debugger.AddressException.getAddress:()J
invokestatic java.lang.Long.toHexString:(J)Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
22: invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
23: aload 1
invokevirtual sun.jvm.hotspot.debugger.AddressException.printStackTrace:()V
end local 1 24: StackMap locals:
StackMap stack:
aload 0
getfield sun.jvm.hotspot.tools.jcore.ClassDump.jarStream:Ljava/util/jar/JarOutputStream;
ifnull 30
25: aload 0
getfield sun.jvm.hotspot.tools.jcore.ClassDump.jarStream:Ljava/util/jar/JarOutputStream;
invokevirtual java.util.jar.JarOutputStream.close:()V
26: goto 29
StackMap locals:
StackMap stack: java.io.IOException
27: astore 1
start local 1 28: aload 1
invokevirtual java.io.IOException.printStackTrace:()V
end local 1 29: StackMap locals:
StackMap stack:
aload 0
aconst_null
putfield sun.jvm.hotspot.tools.jcore.ClassDump.jarStream:Ljava/util/jar/JarOutputStream;
30: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 31 0 this Lsun/jvm/hotspot/tools/jcore/ClassDump;
4 13 1 filterClassName Ljava/lang/String;
5 10 2 filterClass Ljava/lang/Class;
9 10 3 con Ljava/lang/reflect/Constructor;
15 16 1 dirName Ljava/lang/String;
17 18 1 cldg Lsun/jvm/hotspot/classfile/ClassLoaderDataGraph;
20 24 1 e Lsun/jvm/hotspot/debugger/AddressException;
28 29 1 ioe Ljava/io/IOException;
Exception table:
from to target type
4 10 11 Class java.lang.Exception
0 18 19 Class sun.jvm.hotspot.debugger.AddressException
25 26 27 Class java.io.IOException
public java.lang.String getName();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: ldc "jcore"
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lsun/jvm/hotspot/tools/jcore/ClassDump;
private void dumpKlass(sun.jvm.hotspot.oops.InstanceKlass);
descriptor: (Lsun/jvm/hotspot/oops/InstanceKlass;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=8, locals=7, args_size=2
start local 0 start local 1 0: aload 0
getfield sun.jvm.hotspot.tools.jcore.ClassDump.classFilter:Lsun/jvm/hotspot/tools/jcore/ClassFilter;
ifnull 2
aload 0
getfield sun.jvm.hotspot.tools.jcore.ClassDump.classFilter:Lsun/jvm/hotspot/tools/jcore/ClassFilter;
aload 1
invokeinterface sun.jvm.hotspot.tools.jcore.ClassFilter.canInclude:(Lsun/jvm/hotspot/oops/InstanceKlass;)Z
ifne 2
1: return
2: StackMap locals:
StackMap stack:
aload 1
invokevirtual sun.jvm.hotspot.oops.InstanceKlass.getName:()Lsun/jvm/hotspot/oops/Symbol;
invokevirtual sun.jvm.hotspot.oops.Symbol.asString:()Ljava/lang/String;
astore 2
start local 2 3: aload 2
bipush 47
getstatic java.io.File.separatorChar:C
invokevirtual java.lang.String.replace:(CC)Ljava/lang/String;
astore 2
4: aconst_null
astore 3
start local 3 5: aload 0
getfield sun.jvm.hotspot.tools.jcore.ClassDump.jarStream:Ljava/util/jar/JarOutputStream;
ifnull 9
6: aload 0
getfield sun.jvm.hotspot.tools.jcore.ClassDump.jarStream:Ljava/util/jar/JarOutputStream;
new java.util.jar.JarEntry
dup
new java.lang.StringBuilder
dup
aload 2
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc ".class"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.util.jar.JarEntry.<init>:(Ljava/lang/String;)V
invokevirtual java.util.jar.JarOutputStream.putNextEntry:(Ljava/util/zip/ZipEntry;)V
7: aload 0
getfield sun.jvm.hotspot.tools.jcore.ClassDump.jarStream:Ljava/util/jar/JarOutputStream;
astore 3
8: goto 20
9: StackMap locals: java.lang.String java.io.OutputStream
StackMap stack:
aload 2
getstatic java.io.File.separatorChar:C
invokevirtual java.lang.String.lastIndexOf:(I)I
istore 4
start local 4 10: aconst_null
astore 5
start local 5 11: iload 4
iconst_m1
if_icmpeq 15
12: aload 2
iconst_0
iload 4
invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
astore 6
start local 6 13: new java.io.File
dup
aload 0
getfield sun.jvm.hotspot.tools.jcore.ClassDump.outputDirectory:Ljava/lang/String;
aload 6
invokespecial java.io.File.<init>:(Ljava/lang/String;Ljava/lang/String;)V
astore 5
end local 6 14: goto 16
15: StackMap locals: int java.io.File
StackMap stack:
new java.io.File
dup
aload 0
getfield sun.jvm.hotspot.tools.jcore.ClassDump.outputDirectory:Ljava/lang/String;
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
astore 5
16: StackMap locals:
StackMap stack:
aload 5
invokevirtual java.io.File.mkdirs:()Z
pop
17: new java.io.File
dup
aload 5
new java.lang.StringBuilder
dup
aload 2
iload 4
iconst_1
iadd
invokevirtual java.lang.String.substring:(I)Ljava/lang/String;
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc ".class"
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/io/File;Ljava/lang/String;)V
astore 6
start local 6 18: aload 6
invokevirtual java.io.File.createNewFile:()Z
pop
19: new java.io.BufferedOutputStream
dup
new java.io.FileOutputStream
dup
aload 6
invokespecial java.io.FileOutputStream.<init>:(Ljava/io/File;)V
invokespecial java.io.BufferedOutputStream.<init>:(Ljava/io/OutputStream;)V
astore 3
end local 6 end local 5 end local 4 20: StackMap locals:
StackMap stack:
new sun.jvm.hotspot.tools.jcore.ClassWriter
dup
aload 1
aload 3
invokespecial sun.jvm.hotspot.tools.jcore.ClassWriter.<init>:(Lsun/jvm/hotspot/oops/InstanceKlass;Ljava/io/OutputStream;)V
astore 4
start local 4 21: aload 4
invokevirtual sun.jvm.hotspot.tools.jcore.ClassWriter.write:()V
end local 4 22: goto 27
StackMap locals:
StackMap stack: java.lang.Throwable
23: astore 5
24: aload 3
aload 0
getfield sun.jvm.hotspot.tools.jcore.ClassDump.jarStream:Ljava/util/jar/JarOutputStream;
if_acmpeq 26
25: aload 3
invokevirtual java.io.OutputStream.close:()V
26: StackMap locals: sun.jvm.hotspot.tools.jcore.ClassDump sun.jvm.hotspot.oops.InstanceKlass java.lang.String java.io.OutputStream top java.lang.Throwable
StackMap stack:
aload 5
athrow
27: StackMap locals: sun.jvm.hotspot.tools.jcore.ClassDump sun.jvm.hotspot.oops.InstanceKlass java.lang.String java.io.OutputStream
StackMap stack:
aload 3
aload 0
getfield sun.jvm.hotspot.tools.jcore.ClassDump.jarStream:Ljava/util/jar/JarOutputStream;
if_acmpeq 32
28: aload 3
invokevirtual java.io.OutputStream.close:()V
end local 3 29: goto 32
StackMap locals: sun.jvm.hotspot.tools.jcore.ClassDump sun.jvm.hotspot.oops.InstanceKlass java.lang.String
StackMap stack: java.io.IOException
30: astore 3
start local 3 31: aload 3
invokevirtual java.io.IOException.printStackTrace:()V
end local 3 32: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 33 0 this Lsun/jvm/hotspot/tools/jcore/ClassDump;
0 33 1 kls Lsun/jvm/hotspot/oops/InstanceKlass;
3 33 2 klassName Ljava/lang/String;
5 29 3 os Ljava/io/OutputStream;
10 20 4 index I
11 20 5 dir Ljava/io/File;
13 14 6 dirName Ljava/lang/String;
18 20 6 f Ljava/io/File;
21 22 4 cw Lsun/jvm/hotspot/tools/jcore/ClassWriter;
31 32 3 exp Ljava/io/IOException;
Exception table:
from to target type
20 23 23 any
4 29 30 Class java.io.IOException
MethodParameters:
Name Flags
kls
public static void main(java.lang.String[]);
descriptor: ([Ljava/lang/String;)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=2, args_size=1
start local 0 0: new sun.jvm.hotspot.tools.jcore.ClassDump
dup
invokespecial sun.jvm.hotspot.tools.jcore.ClassDump.<init>:()V
astore 1
start local 1 1: aload 1
aload 0
invokevirtual sun.jvm.hotspot.tools.jcore.ClassDump.execute:([Ljava/lang/String;)V
2: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 args [Ljava/lang/String;
1 3 1 cd Lsun/jvm/hotspot/tools/jcore/ClassDump;
MethodParameters:
Name Flags
args
}
SourceFile: "ClassDump.java"
NestMembers:
sun.jvm.hotspot.tools.jcore.ClassDump$1
InnerClasses:
public abstract ClassVisitor = sun.jvm.hotspot.classfile.ClassLoaderDataGraph$ClassVisitor of sun.jvm.hotspot.classfile.ClassLoaderDataGraph
sun.jvm.hotspot.tools.jcore.ClassDump$1