Package net.bytebuddy.dynamic.scaffold
Class MethodRegistry.Handler.ForAnnotationValue
- java.lang.Object
-
- net.bytebuddy.dynamic.scaffold.MethodRegistry.Handler.ForAnnotationValue
-
- All Implemented Interfaces:
InstrumentedType.Prepareable
,MethodRegistry.Handler
,MethodRegistry.Handler.Compiled
- Enclosing interface:
- MethodRegistry.Handler
@Enhance public static class MethodRegistry.Handler.ForAnnotationValue extends java.lang.Object implements MethodRegistry.Handler, MethodRegistry.Handler.Compiled
A handler for defining a default annotation value for a method.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.scaffold.MethodRegistry.Handler
MethodRegistry.Handler.Compiled, MethodRegistry.Handler.ForAbstractMethod, MethodRegistry.Handler.ForAnnotationValue, MethodRegistry.Handler.ForImplementation, MethodRegistry.Handler.ForVisibilityBridge
-
-
Field Summary
Fields Modifier and Type Field Description private AnnotationValue<?,?>
annotationValue
The annotation value to set as a default value.
-
Constructor Summary
Constructors Constructor Description ForAnnotationValue(AnnotationValue<?,?> annotationValue)
Creates a handler for defining a default annotation value for a method.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TypeWriter.MethodPool.Record
assemble(MethodDescription methodDescription, MethodAttributeAppender attributeAppender, Visibility visibility)
Assembles this compiled entry with a method attribute appender.MethodRegistry.Handler.Compiled
compile(Implementation.Target implementationTarget)
Compiles this handler.InstrumentedType
prepare(InstrumentedType instrumentedType)
Prepares a given instrumented type.
-
-
-
Field Detail
-
annotationValue
private final AnnotationValue<?,?> annotationValue
The annotation value to set as a default value.
-
-
Constructor Detail
-
ForAnnotationValue
public ForAnnotationValue(AnnotationValue<?,?> annotationValue)
Creates a handler for defining a default annotation value for a method.- Parameters:
annotationValue
- The annotation value to set as a default value.
-
-
Method Detail
-
prepare
public InstrumentedType prepare(InstrumentedType instrumentedType)
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.
-
compile
public MethodRegistry.Handler.Compiled compile(Implementation.Target implementationTarget)
Compiles this handler.- Specified by:
compile
in interfaceMethodRegistry.Handler
- Parameters:
implementationTarget
- The implementation target to compile this handler for.- Returns:
- A compiled handler.
-
assemble
public TypeWriter.MethodPool.Record assemble(MethodDescription methodDescription, MethodAttributeAppender attributeAppender, Visibility visibility)
Assembles this compiled entry with a method attribute appender.- Specified by:
assemble
in interfaceMethodRegistry.Handler.Compiled
- Parameters:
methodDescription
- The method description to apply with this handler.attributeAppender
- The method attribute appender to apply together with this handler.visibility
- The represented method's minimum visibility.- Returns:
- A method pool entry representing this handler and the given attribute appender.
-
-