Package net.bytebuddy.implementation
Class InvokeDynamic.WithImplicitTarget
java.lang.Object
net.bytebuddy.implementation.InvokeDynamic
net.bytebuddy.implementation.InvokeDynamic.AbstractDelegator
net.bytebuddy.implementation.InvokeDynamic.WithImplicitArguments
net.bytebuddy.implementation.InvokeDynamic.WithImplicitTarget
- All Implemented Interfaces:
InstrumentedType.Prepareable,Implementation,Implementation.Composable
- Enclosing class:
InvokeDynamic
Representation of an
InvokeDynamic implementation where the bootstrapped
method is passed a this reference, if available, and any arguments of the instrumented method and
where the invocation target is implicit.-
Nested Class Summary
Nested classes/interfaces inherited from class net.bytebuddy.implementation.InvokeDynamic
InvokeDynamic.AbstractDelegator, InvokeDynamic.Appender, InvokeDynamic.InvocationProvider, InvokeDynamic.TerminationHandler, InvokeDynamic.WithImplicitArguments, InvokeDynamic.WithImplicitTarget, InvokeDynamic.WithImplicitTypeNested classes/interfaces inherited from interface net.bytebuddy.implementation.Implementation
Implementation.Composable, Implementation.Compound, Implementation.Context, Implementation.Simple, Implementation.SpecialMethodInvocation, Implementation.TargetNested classes/interfaces inherited from interface net.bytebuddy.dynamic.scaffold.InstrumentedType.Prepareable
InstrumentedType.Prepareable.NoOp -
Field Summary
Fields inherited from class net.bytebuddy.implementation.InvokeDynamic
arguments, assigner, bootstrap, invocationProvider, terminationHandler, typing -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedWithImplicitTarget(MethodDescription.InDefinedShape bootstrap, List<? extends JavaConstant> arguments, InvokeDynamic.InvocationProvider invocationProvider, InvokeDynamic.TerminationHandler terminationHandler, Assigner assigner, Assigner.Typing typing) Creates a new dynamic method invocation with implicit arguments and an implicit invocation target. -
Method Summary
Modifier and TypeMethodDescriptionRequests the bootstrap method to bind a method with the given return type.Requests the bootstrap method is passed the given method name.Requests the bootstrap method to bind a method with the given return type.invoke(String methodName, TypeDescription returnType) Requests the bootstrap method to bind a method with the given return type.invoke(TypeDescription returnType) Requests the bootstrap method to bind a method with the given return type.Methods inherited from class net.bytebuddy.implementation.InvokeDynamic.WithImplicitArguments
materialize, withAssigner, withoutArgumentsMethods inherited from class net.bytebuddy.implementation.InvokeDynamic.AbstractDelegator
andThen, appender, prepare, withArgument, withArgument, withBooleanValue, withByteValue, withCharacterValue, withDoubleValue, withEnumeration, withField, withField, withField, withField, withFloatValue, withImplicitAndMethodArguments, withInstance, withIntegerValue, withLongValue, withMethodArguments, withNullValue, withNullValue, withReference, withReference, withShortValue, withThis, withThis, withType, withValue
-
Constructor Details
-
WithImplicitTarget
protected WithImplicitTarget(MethodDescription.InDefinedShape bootstrap, List<? extends JavaConstant> arguments, InvokeDynamic.InvocationProvider invocationProvider, InvokeDynamic.TerminationHandler terminationHandler, Assigner assigner, Assigner.Typing typing) Creates a new dynamic method invocation with implicit arguments and an implicit invocation target.- Parameters:
bootstrap- The bootstrap method or constructor.arguments- The arguments that are provided to the bootstrap method.invocationProvider- The target provided that identifies the method to be bootstrapped.terminationHandler- A handler that handles the method return.assigner- The assigner to be used.typing- Indicates if dynamic type castings should be attempted for incompatible assignments.
-
-
Method Details
-
invoke
Requests the bootstrap method to bind a method with the given return type. The return type is assigned to the intercepted method's return type.- Parameters:
returnType- The return type to request from the bootstrapping method.- Returns:
- This implementation where the bootstrap method is requested to bind a method with the given return type.
-
invoke
Requests the bootstrap method to bind a method with the given return type. The return type is assigned to the intercepted method's return type.- Parameters:
returnType- The return type to request from the bootstrapping method.- Returns:
- This implementation where the bootstrap method is requested to bind a method with the given return type.
-
invoke
Requests the bootstrap method is passed the given method name.- Parameters:
methodName- The method name to pass to the bootstrapping method.- Returns:
- This implementation where the bootstrap method is passed the given method name.
-
invoke
Requests the bootstrap method to bind a method with the given return type. The return type is assigned to the intercepted method's return type. Also, the bootstrap method is passed the given method name.- Parameters:
methodName- The method name to pass to the bootstrapping method.returnType- The return type to request from the bootstrapping method.- Returns:
- This implementation where the bootstrap method is requested to bind a method with the given return type while being passed the given method name.
-
invoke
Requests the bootstrap method to bind a method with the given return type. The return type is assigned to the intercepted method's return type. Also, the bootstrap method is passed the given method name.- Parameters:
methodName- The method name to pass to the bootstrapping method.returnType- The return type to request from the bootstrapping method.- Returns:
- This implementation where the bootstrap method is requested to bind a method with the given return type while being passed the given method name.
-