Package net.bytebuddy.utility
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 acceptsClassVisitor
instances and reader flags.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
AsmClassReader.Factory
A factory to create aAsmClassReader
.static class
AsmClassReader.ForAsm
A class reader for ASM's ownClassReader
.static class
AsmClassReader.ForClassFileApi
A class reader that is based upon the Class File API.
-
Field Summary
Fields Modifier and Type Field Description static org.objectweb.asm.Attribute[]
NO_ATTRIBUTES
Indicates that no custom attributes should be mapped.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
accept(org.objectweb.asm.ClassVisitor classVisitor, int flags)
Accepts a class visitor to read a class.java.util.List<java.lang.String>
getInterfaceInternalNames()
Returns the internal names of the represented class's interfaces.java.lang.String
getInternalName()
Returns the internal name of the represented class.int
getModifiers()
Returns the modifiers of the represented class.java.lang.String
getSuperClassInternalName()
Returns the internal name of the represented class's super class, ornull
if no such class exists.<T> T
unwrap(java.lang.Class<T> type)
Unwraps a class reader to the underlying reader mechanism.
-
-
-
Method Detail
-
unwrap
@MaybeNull <T> T unwrap(java.lang.Class<T> type)
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
null
if 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
java.lang.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
@MaybeNull java.lang.String getSuperClassInternalName()
Returns the internal name of the represented class's super class, ornull
if 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
null
if no such class exists.
-
getInterfaceInternalNames
java.util.List<java.lang.String> getInterfaceInternalNames()
Returns the internal names of the represented class's interfaces. The property is read, if possible, without parsing the entire class file.- Returns:
- Returns the internal names of the represented class's interfaces.
-
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.
-
-