Package net.bytebuddy.implementation
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 java.lang.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 net.bytebuddy.implementation.MethodDelegation.ImplementationDelegate
MethodDelegation.ImplementationDelegate.Compiled, MethodDelegation.ImplementationDelegate.ForConstruction, MethodDelegation.ImplementationDelegate.ForField, MethodDelegation.ImplementationDelegate.ForMethodReturn, MethodDelegation.ImplementationDelegate.ForStaticMethod
-
-
Field Summary
Fields Modifier and Type Field Description private ElementMatcher<? super MethodDescription>matcherThe matcher to use for filtering methods.private MethodGraph.CompilermethodGraphCompilerThe method graph compiler to use.private java.lang.StringnameThe name of the method to invoke.private java.util.List<? extends TargetMethodAnnotationDrivenBinder.ParameterBinder<?>>parameterBindersThe parameter binders to use.-
Fields inherited from interface net.bytebuddy.implementation.MethodDelegation.ImplementationDelegate
FIELD_NAME_PREFIX
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedForMethodReturn(java.lang.String name, MethodGraph.Compiler methodGraphCompiler, java.util.List<? extends TargetMethodAnnotationDrivenBinder.ParameterBinder<?>> parameterBinders, ElementMatcher<? super MethodDescription> matcher)Creates a new implementation delegate for a method return value delegation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MethodDelegation.ImplementationDelegate.Compiledcompile(TypeDescription instrumentedType)Compiles this implementation delegate.InstrumentedTypeprepare(InstrumentedType instrumentedType)Prepares a given instrumented type.
-
-
-
Field Detail
-
name
private final java.lang.String name
The name of the method to invoke.
-
methodGraphCompiler
private final MethodGraph.Compiler methodGraphCompiler
The method graph compiler to use.
-
parameterBinders
private final java.util.List<? extends TargetMethodAnnotationDrivenBinder.ParameterBinder<?>> parameterBinders
The parameter binders to use.
-
matcher
private final ElementMatcher<? super MethodDescription> matcher
The matcher to use for filtering methods.
-
-
Constructor Detail
-
ForMethodReturn
protected ForMethodReturn(java.lang.String name, MethodGraph.Compiler methodGraphCompiler, java.util.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 Detail
-
compile
public MethodDelegation.ImplementationDelegate.Compiled compile(TypeDescription instrumentedType)
Compiles this implementation delegate.- Specified by:
compilein interfaceMethodDelegation.ImplementationDelegate- Parameters:
instrumentedType- The instrumented type.- Returns:
- A compiled implementation delegate.
-
prepare
public InstrumentedType prepare(InstrumentedType instrumentedType)
Prepares a given instrumented type.- Specified by:
preparein interfaceInstrumentedType.Prepareable- Parameters:
instrumentedType- The instrumented type in its current form.- Returns:
- The prepared instrumented type.
-
-