Package net.bytebuddy.utility
Class AsmClassWriter.Factory.Default.NonRetainingAsmClassReader
java.lang.Object
net.bytebuddy.utility.AsmClassWriter.Factory.Default.NonRetainingAsmClassReader
- All Implemented Interfaces:
AsmClassReader
- Enclosing class:
AsmClassWriter.Factory.Default
public static class AsmClassWriter.Factory.Default.NonRetainingAsmClassReader
extends Object
implements AsmClassReader
A class reader that does not retain a compatible
AsmClassWriter
implementation.-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.utility.AsmClassReader
AsmClassReader.Factory, AsmClassReader.ForAsm, AsmClassReader.ForClassFileApi
-
Field Summary
FieldsFields inherited from interface net.bytebuddy.utility.AsmClassReader
NO_ATTRIBUTES
-
Constructor Summary
ConstructorsConstructorDescriptionNonRetainingAsmClassReader
(AsmClassReader delegate) Creates a new non-retaining ASM class writer. -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(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.int
Returns the modifiers of the represented class.Returns the internal name of the represented class's super class, ornull
if no such class exists.<T> T
Unwraps a class reader to the underlying reader mechanism.
-
Field Details
-
delegate
The delegate implementation.
-
-
Constructor Details
-
NonRetainingAsmClassReader
Creates a new non-retaining ASM class writer.- Parameters:
delegate
- The delegate implementation.
-
-
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.
-
toWriter
-
getModifiers
public int getModifiers()Returns the modifiers of the represented class. The property is read, if possible, without parsing the entire class file.- Specified by:
getModifiers
in interfaceAsmClassReader
- Returns:
- The modifiers of the represented class.
-
getInternalName
Returns the internal name of the represented class. The property is read, if possible, without parsing the entire class file.- Specified by:
getInternalName
in interfaceAsmClassReader
- Returns:
- The internal name of the represented class.
-
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.- Specified by:
getSuperClassInternalName
in interfaceAsmClassReader
- Returns:
- The internal name of the represented class's super class, or
null
if no such class exists.
-
getInterfaceInternalNames
Returns the internal names of the represented class's interfaces. The property is read, if possible, without parsing the entire class file.- Specified by:
getInterfaceInternalNames
in interfaceAsmClassReader
- Returns:
- Returns the internal names of the represented class's interfaces.
-
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.
-