Interface AsmClassReader
- All Known Implementing Classes:
AsmClassReader.ForAsm, AsmClassReader.ForClassFileApi, AsmClassWriter.Factory.Default.EmptyAsmClassReader, AsmClassWriter.Factory.Default.NonRetainingAsmClassReader
public interface AsmClassReader
A facade for creating a class reader that accepts
ClassVisitor instances and reader flags.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA factory to create aAsmClassReader.static classA class reader for ASM's ownClassReader.static classA class reader that is based upon the Class File API. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.objectweb.asm.Attribute[]Indicates that no custom attributes should be mapped. -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(org.objectweb.asm.ClassVisitor classVisitor, int flags) Accepts a class visitor to read a class.Returns the internal names of the represented class's interfaces.Returns the internal name of the represented class.intReturns the modifiers of the represented class.Returns the internal name of the represented class's super class, ornullif no such class exists.<T> TUnwraps a class reader to the underlying reader mechanism.
-
Field Details
-
NO_ATTRIBUTES
static final org.objectweb.asm.Attribute[] NO_ATTRIBUTESIndicates that no custom attributes should be mapped.
-
-
Method Details
-
unwrap
Unwraps a class reader to the underlying reader mechanism.- Type Parameters:
T- The type to unwrap.- Parameters:
type- The type of the reader that should be unwrapped.- Returns:
- The unwrapped instance or
nullif the underlying instance does not represent this type.
-
getModifiers
int getModifiers()Returns the modifiers of the represented class. The property is read, if possible, without parsing the entire class file.- Returns:
- The modifiers of the represented class.
-
getInternalName
String getInternalName()Returns the internal name of the represented class. The property is read, if possible, without parsing the entire class file.- Returns:
- The internal name of the represented class.
-
getSuperClassInternalName
Returns the internal name of the represented class's super class, ornullif no such class exists. The property is read, if possible, without parsing the entire class file.- Returns:
- The internal name of the represented class's super class, or
nullif no such class exists.
-
getInterfaceInternalNames
-
accept
void accept(org.objectweb.asm.ClassVisitor classVisitor, int flags) Accepts a class visitor to read a class.- Parameters:
classVisitor- The class visitor who should be used as a callback for a class file.flags- The flags to consider while reading a class.
-