Class InvokeDynamic.WithImplicitType

All Implemented Interfaces:
InstrumentedType.Prepareable, Implementation, Implementation.Composable
Direct Known Subclasses:
InvokeDynamic.WithImplicitType.OfArgument, InvokeDynamic.WithImplicitType.OfField, InvokeDynamic.WithImplicitType.OfInstance
Enclosing class:
InvokeDynamic

public abstract static class InvokeDynamic.WithImplicitType extends InvokeDynamic.AbstractDelegator
An InvokeDynamic invocation where the last argument is assigned its implicit type.
  • Constructor Details

    • WithImplicitType

      protected WithImplicitType(MethodDescription.InDefinedShape bootstrap, List<? extends JavaConstant> arguments, InvokeDynamic.InvocationProvider invocationProvider, InvokeDynamic.TerminationHandler terminationHandler, Assigner assigner, Assigner.Typing typing)
      Creates a new abstract delegator for a dynamic method invocation where the last argument is assigned an implicit type.
      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

    • as

      public InvokeDynamic as(Class<?> type)
      Represents the last value as an instance of the given type.
      Parameters:
      type - The type to represent to the dynamic method invocation.
      Returns:
      A new dynamic method invocation where the last argument is represented by the given type.
    • as

      public abstract InvokeDynamic as(TypeDescription typeDescription)
      Represents the last value as an instance of the given type.
      Parameters:
      typeDescription - The type to represent to the dynamic method invocation.
      Returns:
      A new dynamic method invocation where the last argument is represented by the given type.