Package net.bytebuddy.utility
Enum AsmClassWriter.Factory.Default.EmptyAsmClassReader
- java.lang.Object
-
- java.lang.Enum<AsmClassWriter.Factory.Default.EmptyAsmClassReader>
-
- net.bytebuddy.utility.AsmClassWriter.Factory.Default.EmptyAsmClassReader
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<AsmClassWriter.Factory.Default.EmptyAsmClassReader>
,AsmClassReader
- Enclosing class:
- AsmClassWriter.Factory.Default
protected static enum AsmClassWriter.Factory.Default.EmptyAsmClassReader extends java.lang.Enum<AsmClassWriter.Factory.Default.EmptyAsmClassReader> implements AsmClassReader
An empty class reader for ASM that never unwraps an underlying implementation.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.utility.AsmClassReader
AsmClassReader.Factory, AsmClassReader.ForAsm, AsmClassReader.ForClassFileApi
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
The singleton instance.
-
Field Summary
-
Fields inherited from interface net.bytebuddy.utility.AsmClassReader
NO_ATTRIBUTES
-
-
Constructor Summary
Constructors Modifier Constructor Description private
EmptyAsmClassReader()
-
Method Summary
All Methods Static Methods Instance Methods Concrete 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.AsmClassWriter
toWriter(int flags, TypePool typePool)
<T> T
unwrap(java.lang.Class<T> type)
Unwraps a class reader to the underlying reader mechanism.static AsmClassWriter.Factory.Default.EmptyAsmClassReader
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static AsmClassWriter.Factory.Default.EmptyAsmClassReader[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final AsmClassWriter.Factory.Default.EmptyAsmClassReader INSTANCE
The singleton instance.
-
-
Method Detail
-
values
public static AsmClassWriter.Factory.Default.EmptyAsmClassReader[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (AsmClassWriter.Factory.Default.EmptyAsmClassReader c : AsmClassWriter.Factory.Default.EmptyAsmClassReader.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AsmClassWriter.Factory.Default.EmptyAsmClassReader valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
toWriter
@AlwaysNull public AsmClassWriter toWriter(int flags, TypePool typePool)
-
unwrap
@AlwaysNull public <T> T unwrap(java.lang.Class<T> type)
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.
-
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
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:
getInternalName
in interfaceAsmClassReader
- Returns:
- The internal name of the represented class.
-
getSuperClassInternalName
public 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.- Specified by:
getSuperClassInternalName
in interfaceAsmClassReader
- Returns:
- The internal name of the represented class's super class, or
null
if 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:
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.
-
-