Package net.bytebuddy.utility
Enum AsmClassReader.Factory.Default
- All Implemented Interfaces:
Serializable
,Comparable<AsmClassReader.Factory.Default>
,java.lang.constant.Constable
,AsmClassReader.Factory
- Enclosing interface:
AsmClassReader.Factory
public static enum AsmClassReader.Factory.Default
extends Enum<AsmClassReader.Factory.Default>
implements AsmClassReader.Factory
Default implementations for factories of
AsmClassReader
s.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Nested classes/interfaces inherited from interface net.bytebuddy.utility.AsmClassReader.Factory
AsmClassReader.Factory.Default
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA factory for a class reader that uses ASM's internal implementation whenever possible.A factory for a class reader that always uses ASM's internal implementation.A factory for a class reader that uses the class file API whenever possible.A factory for a class reader that always uses the class file API.Uses a processor as it is configured byOpenedClassReader.PROCESSOR_PROPERTY
, orAsmClassWriter.Factory.Default.ASM_FIRST
if no implicit processor is defined. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final AsmClassReader.Factory
The implicit factory to use for writing class files. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static <T> T
doPrivileged
(PrivilegedAction<T> action) A proxy forjava.security.AccessController#doPrivileged
that is activated if available.make
(byte[] binaryRepresentation) Creates a class reader for a given class file.Returns the enum constant of this type with the specified name.static AsmClassReader.Factory.Default[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from interface net.bytebuddy.utility.AsmClassReader.Factory
make
-
Enum Constant Details
-
IMPLICIT
Uses a processor as it is configured byOpenedClassReader.PROCESSOR_PROPERTY
, orAsmClassWriter.Factory.Default.ASM_FIRST
if no implicit processor is defined. -
ASM_FIRST
A factory for a class reader that uses ASM's internal implementation whenever possible. -
CLASS_FILE_API_FIRST
A factory for a class reader that uses the class file API whenever possible. -
ASM_ONLY
A factory for a class reader that always uses ASM's internal implementation. -
CLASS_FILE_API_ONLY
A factory for a class reader that always uses the class file API.
-
-
Field Details
-
FACTORY
The implicit factory to use for writing class files.
-
-
Constructor Details
-
Default
private Default()
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
doPrivileged
A proxy forjava.security.AccessController#doPrivileged
that is activated if available.- Type Parameters:
T
- The type of the action's resolved value.- Parameters:
action
- The action to execute from a privileged context.- Returns:
- The action's resolved value.
-
make
Creates a class reader for a given class file.- Specified by:
make
in interfaceAsmClassReader.Factory
- Parameters:
binaryRepresentation
- The class file's binary representation.- Returns:
- A class reader representation for the supplied class file.
-