Class InvokeDynamic.WithImplicitTarget

    • 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.