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 java.lang.Object implements AsmClassReader
A class reader that does not retain a compatibleAsmClassWriterimplementation.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.utility.AsmClassReader
AsmClassReader.Factory, AsmClassReader.ForAsm, AsmClassReader.ForClassFileApi
-
-
Field Summary
Fields Modifier and Type Field Description private AsmClassReaderdelegateThe delegate implementation.-
Fields inherited from interface net.bytebuddy.utility.AsmClassReader
NO_ATTRIBUTES
-
-
Constructor Summary
Constructors Constructor Description NonRetainingAsmClassReader(AsmClassReader delegate)Creates a new non-retaining ASM class writer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(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.StringgetInternalName()Returns the internal name of the represented class.intgetModifiers()Returns the modifiers of the represented class.java.lang.StringgetSuperClassInternalName()Returns the internal name of the represented class's super class, ornullif no such class exists.AsmClassWritertoWriter(int flags, TypePool typePool)<T> Tunwrap(java.lang.Class<T> type)Unwraps a class reader to the underlying reader mechanism.
-
-
-
Field Detail
-
delegate
private final AsmClassReader delegate
The delegate implementation.
-
-
Constructor Detail
-
NonRetainingAsmClassReader
public NonRetainingAsmClassReader(AsmClassReader delegate)
Creates a new non-retaining ASM class writer.- Parameters:
delegate- The delegate implementation.
-
-
Method Detail
-
unwrap
@MaybeNull public <T> T unwrap(java.lang.Class<T> type)
Unwraps a class reader to the underlying reader mechanism.- Specified by:
unwrapin interfaceAsmClassReader- 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.
-
toWriter
@AlwaysNull public AsmClassWriter toWriter(int flags, TypePool typePool)
-
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:
getModifiersin interfaceAsmClassReader- Returns:
- The modifiers of the represented class.
-
getInternalName
public java.lang.String getInternalName()
Returns the internal name of the represented class. The property is read, if possible, without parsing the entire class file.- Specified by:
getInternalNamein interfaceAsmClassReader- Returns:
- The internal name of the represented class.
-
getSuperClassInternalName
@MaybeNull public java.lang.String 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.- Specified by:
getSuperClassInternalNamein interfaceAsmClassReader- Returns:
- The internal name of the represented class's super class, or
nullif no such class exists.
-
getInterfaceInternalNames
public 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.- Specified by:
getInterfaceInternalNamesin 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:
acceptin 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.
-
-