Package net.bytebuddy.utility
Class AsmClassReader.ForAsm
java.lang.Object
net.bytebuddy.utility.AsmClassReader.ForAsm
- All Implemented Interfaces:
AsmClassReader
- Enclosing interface:
AsmClassReader
A class reader for ASM's own
ClassReader
.-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.utility.AsmClassReader
AsmClassReader.Factory, AsmClassReader.ForAsm, AsmClassReader.ForClassFileApi
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.objectweb.asm.ClassReader
The class reader that represents the class file to be read.Fields inherited from interface net.bytebuddy.utility.AsmClassReader
NO_ATTRIBUTES
-
Constructor Summary
ConstructorsConstructorDescriptionForAsm
(org.objectweb.asm.ClassReader classReader) Creates a new ASM class reader that uses ASM's internal implementation. -
Method Summary
-
Field Details
-
classReader
private final org.objectweb.asm.ClassReader classReaderThe class reader that represents the class file to be read.
-
-
Constructor Details
-
ForAsm
public ForAsm(org.objectweb.asm.ClassReader classReader) Creates a new ASM class reader that uses ASM's internal implementation.- Parameters:
classReader
- The class reader that represents the class file to be read.
-
-
Method Details
-
unwrap
Unwraps a class reader to the underlying reader mechanism.- Specified by:
unwrap
in interfaceAsmClassReader
- Type Parameters:
T
- The type to unwrap.- Parameters:
type
- The type of the reader that should be unwrapped.- Returns:
- The unwrapped instance or
null
if the underlying instance does not represent this type.
-
accept
public void accept(org.objectweb.asm.ClassVisitor classVisitor, int flags) Accepts a class visitor to read a class.- Specified by:
accept
in interfaceAsmClassReader
- 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.
-