ClassStub objects reflecting their structure.
| Modifier and Type | Class and Description |
|---|---|
| private abstract static class | |
| private static class | |
| private static class |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static String | |
| public static ClassStub | Returns: the class stuban URL from a class loader, most likely a file system file or a JAR entry. url)Loads the URL contents and parses them with ASM, producing a |
| private static AsmDecompiler. |
| AsmDecompiler | back to summary |
|---|---|
| public AsmDecompiler() | |
| fromInternalName | back to summary |
|---|---|
| pack-priv static String fromInternalName(String name) | |
| parseClass | back to summary |
|---|---|
| public static ClassStub parseClass(URL url) throws IOException Loads the URL contents and parses them with ASM, producing a
| |
| readAnnotationMembers | back to summary |
|---|---|
| private static AsmDecompiler. | |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | visit(String
the value name. name, Object the actual value, whose type must be value)Byte, Boolean, Character, Short, Integer , Long, Float, Double,
String or Type of Type#OBJECT or Type#ARRAY sort. This
value can also be an array of byte, boolean, short, char, int, long, float or double values
(this is equivalent to using visitArray and visiting each array element in turn,
but is more convenient).Overrides org. |
| public AnnotationVisitor | visitAnnotation(String
the value name. name, String the class descriptor of the nested annotation class. desc)Overrides org. |
| public AnnotationVisitor | visitArray(String
the value name. name)
Visits an array value of the annotation.
|
| pack-priv abstract void | |
| public void |
| AnnotationReader | back to summary |
|---|---|
| public AnnotationReader() | |
| visit | back to summary |
|---|---|
| public void visit(String name, Object value) Overrides org. Doc from org. Visits a primitive value of the annotation.
| |
| visitAnnotation | back to summary |
|---|---|
| public AnnotationVisitor visitAnnotation(String name, String desc) Overrides org. Doc from org. Visits a nested annotation value of the annotation.
| |
| visitArray | back to summary |
|---|---|
| public AnnotationVisitor visitArray(String name) Overrides org. Doc from org. Visits an array value of the annotation. Note that arrays of primitive values (such as byte,
boolean, short, char, int, long, float or double) can be passed as value to
| |
| visitAttribute | back to summary |
|---|---|
| pack-priv abstract void visitAttribute(String name, Object value) | |
| visitEnum | back to summary |
|---|---|
| public void visitEnum(String name, String desc, String value) Overrides org. Doc from org. Visits an enumeration value of the annotation. | |
| Modifier and Type | Field and Description |
|---|---|
| private static final String[] | |
| private ClassStub |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | visit(int
the class version. The minor version is stored in the 16 most significant bits,
and the major version in the 16 least significant bits. version, int the class's access flags (see access, String Opcodes). This parameter also indicates if
the class is deprecated Opcodes#ACC_DEPRECATED or a record Opcodes#ACC_RECORD.the internal name of the class (see name, String Type#getInternalName()).the signature of this class. May be null if the class is not a
generic one, and does not extend or implement generic classes or interfaces. signature, String the internal of name of the super class (see superName, String[] Type#getInternalName()).
For interfaces, the super class is Object. May be null, but only for the
Object class.the internal names of the class's interfaces (see interfaceNames)Type#getInternalName()). May be null.Overrides org. |
| public AnnotationVisitor | visitAnnotation(String
the class descriptor of the annotation class. desc, boolean true if the annotation is visible at runtime. visible)
Visits an annotation of the class.
|
| public FieldVisitor | visitField(int
the field's access flags (see access, String Opcodes). This parameter also indicates if
the field is synthetic and/or deprecated.the field's name. name, String the field's descriptor (see desc, String Type).the field's signature. May be null if the field's type does not use
generic types. signature, Object the field's initial value. This parameter, which may be null if the
field does not have an initial value, must be an value)Integer, a Float, a Long, a Double or a String (for int, float, long
or String fields respectively). This parameter is only used for static
fields. Its value is ignored for non static fields, which must be initialized through
bytecode instructions in constructors or methods.Overrides org. |
| public void | visitInnerClass(String
the internal name of C (see name, String Type#getInternalName()).the internal name of the class or interface C is a member of (see outerName, String Type#getInternalName()). Must be null if C is not the member of a class or
interface (e.g. for local or anonymous classes).the (simple) name of C. Must be null for anonymous inner classes. innerName, int the access flags of C originally declared in the source code from which this
class was compiled. access)
Visits information about an inner class.
|
| public MethodVisitor | visitMethod(int
the method's access flags (see access, String Opcodes). This parameter also indicates if
the method is synthetic and/or deprecated.the method's name. name, String the method's descriptor (see desc, String Type).the method's signature. May be null if the method parameters,
return type and exceptions do not use generic types. signature, String[] the internal names of the method's exception classes (see exceptions)Type#getInternalName()). May be null.Overrides org. |
| EMPTY_STRING_ARRAY | back to summary |
|---|---|
| private static final String[] EMPTY_STRING_ARRAY | |
| result | back to summary |
|---|---|
| private ClassStub result | |
| DecompilingVisitor | back to summary |
|---|---|
| public DecompilingVisitor() | |
| visit | back to summary |
|---|---|
| public void visit(int version, int access, String name, String signature, String superName, String[] interfaceNames) Overrides org. Doc from org. Visits the header of the class.
| |
| visitAnnotation | back to summary |
|---|---|
| public AnnotationVisitor visitAnnotation(String desc, boolean visible) Overrides org. Doc from org. Visits an annotation of the class.
| |
| visitField | back to summary |
|---|---|
| public FieldVisitor visitField(int access, String name, String desc, String signature, Object value) Overrides org. Doc from org. Visits a field of the class.
| |
| visitInnerClass | back to summary |
|---|---|
| public void visitInnerClass(String name, String outerName, String innerName, int access) Overrides org. Doc from org. Visits information about an inner class. This inner class is not necessarily a member of the class being visited. More precisely, every class or interface C which is referenced by this class and which is not a package member must be visited with this method. This class must reference its nested class or interface members, and its enclosing class, if any. See the JVMS 4.7.6 section for more details.
| |
| visitMethod | back to summary |
|---|---|
| public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) Overrides org. Doc from org. Visits a method of the class. This method must return a new
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final Map | map
Caches stubs per URI. |
| Access | Constructor and Description |
|---|---|
| private |
| map | back to summary |
|---|---|
| pack-priv static final Map<URI, SoftReference<ClassStub>> map Caches stubs per URI. This cache is useful when performing multiple compilations in the same JVM/class loader and in tests. It's synchronized "just in case". Occasional misses are expected if several threads attempt to load the same class, but this shouldn't result in serious memory issues. | |
| StubCache | back to summary |
|---|---|
| private StubCache() | |