Class MethodDelegation.ImplementationDelegate.ForMethodReturn
java.lang.Object
net.bytebuddy.implementation.MethodDelegation.ImplementationDelegate.ForMethodReturn
- All Implemented Interfaces:
InstrumentedType.Prepareable, MethodDelegation.ImplementationDelegate
- Enclosing interface:
MethodDelegation.ImplementationDelegate
@Enhance
public static class MethodDelegation.ImplementationDelegate.ForMethodReturn
extends Object
implements MethodDelegation.ImplementationDelegate
An implementation delegate for invoking a delegation target on the another methods return value.
-
Nested Class Summary
Nested classes/interfaces inherited from interface InstrumentedType.Prepareable
InstrumentedType.Prepareable.NoOpNested classes/interfaces inherited from interface MethodDelegation.ImplementationDelegate
MethodDelegation.ImplementationDelegate.Compiled, MethodDelegation.ImplementationDelegate.ForConstruction, MethodDelegation.ImplementationDelegate.ForField, MethodDelegation.ImplementationDelegate.ForMethodReturn, MethodDelegation.ImplementationDelegate.ForStaticMethod -
Field Summary
Fields inherited from interface MethodDelegation.ImplementationDelegate
FIELD_NAME_PREFIX -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedForMethodReturn(String name, MethodGraph.Compiler methodGraphCompiler, List<? extends TargetMethodAnnotationDrivenBinder.ParameterBinder<?>> parameterBinders, ElementMatcher<? super MethodDescription> matcher) Creates a new implementation delegate for a method return value delegation. -
Method Summary
Modifier and TypeMethodDescriptioncompile(TypeDescription instrumentedType) Compiles this implementation delegate.prepare(InstrumentedType instrumentedType) Prepares a given instrumented type.
-
Constructor Details
-
ForMethodReturn
protected ForMethodReturn(String name, MethodGraph.Compiler methodGraphCompiler, List<? extends TargetMethodAnnotationDrivenBinder.ParameterBinder<?>> parameterBinders, ElementMatcher<? super MethodDescription> matcher) Creates a new implementation delegate for a method return value delegation.- Parameters:
name- The name of the method to invoke.methodGraphCompiler- The method graph compiler to use.parameterBinders- The parameter binders to use.matcher- The matcher to use for filtering methods.
-
-
Method Details
-
compile
Compiles this implementation delegate.- Specified by:
compilein interfaceMethodDelegation.ImplementationDelegate- Parameters:
instrumentedType- The instrumented type.- Returns:
- A compiled implementation delegate.
-
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.
-