Package net.bytebuddy
Class ByteBuddy.EnumerationImplementation
- java.lang.Object
-
- net.bytebuddy.ByteBuddy.EnumerationImplementation
-
- All Implemented Interfaces:
InstrumentedType.Prepareable
,Implementation
- Enclosing class:
- ByteBuddy
protected static class ByteBuddy.EnumerationImplementation extends java.lang.Object implements Implementation
An implementation fo thevalues
method of an enumeration type.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
ByteBuddy.EnumerationImplementation.InitializationAppender
A byte code appender for the type initializer of any enumeration type.protected static class
ByteBuddy.EnumerationImplementation.ValuesMethodAppender
A byte code appender for thevalues
method of any enumeration type.-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.Implementation
Implementation.Composable, Implementation.Compound, Implementation.Context, Implementation.Simple, Implementation.SpecialMethodInvocation, Implementation.Target
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
CLONE_METHOD_NAME
The name of theObject.clone()
method.protected static java.lang.String
ENUM_VALUE_OF_METHOD_NAME
The name of thevalueOf
method that is defined for any enumeration.protected static java.lang.String
ENUM_VALUES_METHOD_NAME
The name of thevalues
method that is defined for any enumeration.
-
Constructor Summary
Constructors Modifier Constructor Description protected
EnumerationImplementation(java.util.List<java.lang.String> values)
Creates a new implementation of an enumeration type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteCodeAppender
appender(Implementation.Target implementationTarget)
Creates a byte code appender that determines the implementation of the instrumented type's methods.InstrumentedType
prepare(InstrumentedType instrumentedType)
Prepares a given instrumented type.
-
-
-
Field Detail
-
CLONE_METHOD_NAME
protected static final java.lang.String CLONE_METHOD_NAME
The name of theObject.clone()
method.- See Also:
- Constant Field Values
-
ENUM_VALUE_OF_METHOD_NAME
protected static final java.lang.String ENUM_VALUE_OF_METHOD_NAME
The name of thevalueOf
method that is defined for any enumeration.- See Also:
- Constant Field Values
-
ENUM_VALUES_METHOD_NAME
protected static final java.lang.String ENUM_VALUES_METHOD_NAME
The name of thevalues
method that is defined for any enumeration.- See Also:
- Constant Field Values
-
-
Method Detail
-
prepare
public InstrumentedType prepare(InstrumentedType instrumentedType)
Description copied from interface:InstrumentedType.Prepareable
Prepares a given instrumented type.- Specified by:
prepare
in interfaceInstrumentedType.Prepareable
- Parameters:
instrumentedType
- The instrumented type in its current form.- Returns:
- The prepared instrumented type.
-
appender
public ByteCodeAppender appender(Implementation.Target implementationTarget)
Description copied from interface:Implementation
Creates a byte code appender that determines the implementation of the instrumented type's methods.- Specified by:
appender
in interfaceImplementation
- Parameters:
implementationTarget
- The target of the current implementation.- Returns:
- A byte code appender for implementing methods delegated to this implementation. This byte code appender
is also responsible for handling methods that were added by this implementation on the call to
InstrumentedType.Prepareable.prepare(InstrumentedType)
.
-
-