Class ByteBuddy.EnumerationImplementation
java.lang.Object
net.bytebuddy.ByteBuddy.EnumerationImplementation
- All Implemented Interfaces:
InstrumentedType.Prepareable, Implementation
- Enclosing class:
ByteBuddy
@Enhance
protected static class ByteBuddy.EnumerationImplementation
extends Object
implements Implementation
An implementation fo the
values method of an enumeration type.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classA byte code appender for the type initializer of any enumeration type.protected static classA byte code appender for thevaluesmethod of any enumeration type.Nested classes/interfaces inherited from interface Implementation
Implementation.Composable, Implementation.Compound, Implementation.Context, Implementation.Simple, Implementation.SpecialMethodInvocation, Implementation.TargetNested classes/interfaces inherited from interface InstrumentedType.Prepareable
InstrumentedType.Prepareable.NoOp -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final StringThe name of theObject.clone()method.protected static final StringThe name of thevalueOfmethod that is defined for any enumeration.protected static final StringThe name of thevaluesmethod that is defined for any enumeration. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEnumerationImplementation(List<String> values) Creates a new implementation of an enumeration type. -
Method Summary
Modifier and TypeMethodDescriptionappender(Implementation.Target implementationTarget) Creates a byte code appender that determines the implementation of the instrumented type's methods.prepare(InstrumentedType instrumentedType) Prepares a given instrumented type.
-
Field Details
-
CLONE_METHOD_NAME
-
ENUM_VALUE_OF_METHOD_NAME
The name of thevalueOfmethod that is defined for any enumeration.- See Also:
-
ENUM_VALUES_METHOD_NAME
The name of thevaluesmethod that is defined for any enumeration.- See Also:
-
-
Constructor Details
-
EnumerationImplementation
-
-
Method Details
-
prepare
Prepares a given instrumented type.- Specified by:
preparein interfaceInstrumentedType.Prepareable- Parameters:
instrumentedType- The instrumented type in its current form.- Returns:
- The prepared instrumented type.
-
appender
Creates a byte code appender that determines the implementation of the instrumented type's methods.- Specified by:
appenderin 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).
-