Class InvokeDynamic.WithImplicitArguments

All Implemented Interfaces:
InstrumentedType.Prepareable, Implementation, Implementation.Composable
Direct Known Subclasses:
InvokeDynamic.WithImplicitTarget
Enclosing class:
InvokeDynamic

public static class InvokeDynamic.WithImplicitArguments extends InvokeDynamic.AbstractDelegator
Representation of an InvokeDynamic implementation where the bootstrapped method is passed a this reference, if available, and any arguments of the instrumented method.
  • Constructor Details

    • WithImplicitArguments

      protected WithImplicitArguments(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.
      Parameters:
      bootstrap - The bootstrap method or constructor.
      arguments - The arguments that are provided to the bootstrap method or constructor.
      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

    • withoutArguments

      public InvokeDynamic withoutArguments()
      Returns an instance of this instrumentation where the bootstrapped method is not passed any arguments.
      Returns:
      This implementation where the bootstrapped method is not passed any arguments.
    • materialize

      protected InvokeDynamic materialize()
      Description copied from class: InvokeDynamic.AbstractDelegator
      Resolves the current configuration into a fully initialized invoke dynamic instance.
      Specified by:
      materialize in class InvokeDynamic.AbstractDelegator
      Returns:
      The fully resolved invoke dynamic instance.
    • withAssigner

      public InvokeDynamic.WithImplicitArguments withAssigner(Assigner assigner, Assigner.Typing typing)
      Instructs this implementation to use the provided assigner and decides if the assigner should apply dynamic typing.
      Overrides:
      withAssigner in class InvokeDynamic.AbstractDelegator
      Parameters:
      assigner - The assigner to use.
      typing - true if the assigner should attempt dynamic typing.
      Returns:
      The invoke dynamic instruction where the given assigner and dynamic-typing directive are applied.