Tabnine Logo
Binder.foldVoid
Code IndexAdd Tabnine to your IDE (free)

How to use
foldVoid
method
in
com.headius.invokebinder.Binder

Best Java code snippets using com.headius.invokebinder.Binder.foldVoid (Showing top 4 results out of 315)

origin: com.headius/invokebinder

/**
 * Pass all arguments to the given function and drop any result.
 *
 * @param function a function which will receive all arguments and have its
 *                 return value inserted into the call chain
 * @return a new SmartBinder with the fold applied
 */
public SmartBinder foldVoid(MethodHandle function) {
  return new SmartBinder(this, signature(), binder.foldVoid(function));
}
origin: com.headius/invokebinder

private MethodHandle nativeTryFinally(MethodHandle target, MethodHandle post) {
  MethodType targetType = target.type();
  boolean voidReturn = targetType.returnType() == Void.TYPE;
  MethodType finallyType = targetType.insertParameterTypes(0, Throwable.class);
  int dropCount = 1;
  if (!voidReturn) {
    finallyType = finallyType.insertParameterTypes(1, targetType.returnType());
    dropCount = 2;
  }
  MethodHandle wrapPost = Binder
      .from(finallyType)
      .drop(0, dropCount)
      .invoke(post);
  if (!voidReturn) {
    wrapPost = Binder.from(finallyType)
        .foldVoid(wrapPost)
        .permute(1)
        .identity();
  }
  try {
    return (MethodHandle) tryFinallyJava9.invokeExact(target, wrapPost);
  } catch (Throwable t) {
    throw new RuntimeException("Java 9 detected but MethodHandles.tryFinally missing", t);
  }
}
origin: org.jruby/jruby-complete

.foldVoid(traceCall)
.tryFinally(traceReturn)
.invoke(target);
origin: org.jruby/jruby-core

.foldVoid(traceCall)
.tryFinally(traceReturn)
.invoke(target);
com.headius.invokebinderBinderfoldVoid

Javadoc

Process the incoming arguments using the given handle, leaving the argument list unmodified.

Popular methods of Binder

  • from
    Construct a new Binder, starting from a given MethodType.
  • insert
    Insert at the given index the given argument value(s).
  • invoke
    Apply the chain of transforms and bind them to a static method specified using the end signature plu
  • collect
    Box all incoming arguments from the given position onward into the given array type.
  • constant
    Apply the tranforms, binding them to a constant value that will propagate back through the chain. Th
  • drop
    Drop from the given index a number of arguments.
  • filter
    Filter incoming arguments, from the given index, replacing each with the result of calling the assoc
  • fold
    Process the incoming arguments using the given handle, inserting the result as the first argument.
  • invokeVirtual
    Apply the chain of transforms and bind them to a virtual method specified using the end signature pl
  • permute
    Permute the incoming arguments to a new sequence specified by the given values. Arguments may be dup
  • cast
    Cast the incoming arguments to the given MethodType. The casts applied are equivalent to those in Me
  • filterReturn
    Filter return value, using a function that produces the current return type from another type. The n
  • cast,
  • filterReturn,
  • invokeStaticQuiet,
  • invokeVirtualQuiet,
  • tryFinally,
  • nop,
  • type,
  • append,
  • identity

Popular in Java

  • Updating database using SQL prepared statement
  • findViewById (Activity)
  • addToBackStack (FragmentTransaction)
  • setScale (BigDecimal)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Join (org.hibernate.mapping)
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now