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
public static class InvokeDynamic.WithImplicitTarget extends InvokeDynamic.WithImplicitArguments
Representation of anInvokeDynamic
implementation where the bootstrapped method is passed athis
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.WithImplicitType
-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.Implementation
Implementation.Composable, Implementation.Compound, Implementation.Context, Implementation.Simple, Implementation.SpecialMethodInvocation, Implementation.Target
-
-
Field Summary
-
Fields inherited from class net.bytebuddy.implementation.InvokeDynamic
arguments, assigner, bootstrap, invocationProvider, terminationHandler, typing
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
WithImplicitTarget(MethodDescription.InDefinedShape bootstrap, java.util.List<?> 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InvokeDynamic.WithImplicitArguments
invoke(java.lang.Class<?> returnType)
Requests the bootstrap method to bind a method with the given return type.InvokeDynamic.WithImplicitArguments
invoke(java.lang.String methodName)
Requests the bootstrap method is passed the given method name.InvokeDynamic.WithImplicitArguments
invoke(java.lang.String methodName, java.lang.Class<?> returnType)
Requests the bootstrap method to bind a method with the given return type.InvokeDynamic.WithImplicitArguments
invoke(java.lang.String methodName, TypeDescription returnType)
Requests the bootstrap method to bind a method with the given return type.InvokeDynamic.WithImplicitArguments
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, withoutArguments
-
Methods 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 Detail
-
WithImplicitTarget
protected WithImplicitTarget(MethodDescription.InDefinedShape bootstrap, java.util.List<?> 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 Detail
-
invoke
public InvokeDynamic.WithImplicitArguments invoke(java.lang.Class<?> returnType)
Requests the bootstrap method to bind a method with the given return type. The return type is he 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
public InvokeDynamic.WithImplicitArguments invoke(TypeDescription returnType)
Requests the bootstrap method to bind a method with the given return type. The return type is he 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
public InvokeDynamic.WithImplicitArguments invoke(java.lang.String methodName)
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
public InvokeDynamic.WithImplicitArguments invoke(java.lang.String methodName, java.lang.Class<?> returnType)
Requests the bootstrap method to bind a method with the given return type. The return type is he 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
public InvokeDynamic.WithImplicitArguments invoke(java.lang.String methodName, TypeDescription returnType)
Requests the bootstrap method to bind a method with the given return type. The return type is he 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.
-
-