public static class AsmClassReader.ForAsm extends Object implements AsmClassReader
ClassReader
.AsmClassReader.Factory, AsmClassReader.ForAsm, AsmClassReader.ForClassFileApi
NO_ATTRIBUTES
Constructor and Description |
---|
ForAsm(ClassReader classReader)
Creates a new ASM class reader that uses ASM's internal implementation.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(ClassVisitor classVisitor,
int flags)
Accepts a class visitor to read a class.
|
List<String> |
getInterfaceInternalNames()
Returns the internal names of the represented class's interfaces.
|
String |
getInternalName()
Returns the internal name of the represented class.
|
int |
getModifiers()
Returns the modifiers of the represented class.
|
String |
getSuperClassInternalName()
Returns the internal name of the represented class's super class, or
null if no such class exists. |
<T> T |
unwrap(Class<T> type)
Unwraps a class reader to the underlying reader mechanism.
|
public ForAsm(ClassReader classReader)
classReader
- The class reader that represents the class file to be read.@MaybeNull public <T> T unwrap(Class<T> type)
unwrap
in interface AsmClassReader
T
- The type to unwrap.type
- The type of the reader that should be unwrapped.null
if the underlying instance does not represent this type.public int getModifiers()
getModifiers
in interface AsmClassReader
public String getInternalName()
getInternalName
in interface AsmClassReader
public String getSuperClassInternalName()
null
if no such class exists.
The property is read, if possible, without parsing the entire class file.getSuperClassInternalName
in interface AsmClassReader
null
if no such class exists.public List<String> getInterfaceInternalNames()
getInterfaceInternalNames
in interface AsmClassReader
public void accept(ClassVisitor classVisitor, int flags)
accept
in interface AsmClassReader
classVisitor
- The class visitor who should be used as a callback for a class file.flags
- The flags to consider while reading a class.Copyright © 2014–2025. All rights reserved.