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

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

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

origin: org.projectodd.rephract/rephract

public MultiBinder filter(int index, MethodHandle... functions) {
  this.invokeBinder = invokeBinder.filter(index, functions);
  this.guardBinder = guardBinder.filter(index, functions);
  return this;
}
origin: org.jruby/jruby-complete

.from(site.type())
.permute(2)
.filter(0, receiverConverter)
.filterReturn(filter)
.cast(fieldHandle.type())
.from(site.type())
.permute(2, 3)
.filter(0, receiverConverter)
.filterReturn(constant(IRubyObject.class, self.getRuntime().getNil()))
.cast(fieldHandle.type())
origin: org.jruby/jruby-core

.from(site.type())
.permute(2)
.filter(0, receiverConverter)
.filterReturn(filter)
.cast(fieldHandle.type())
.from(site.type())
.permute(2, 3)
.filter(0, receiverConverter)
.filterReturn(constant(IRubyObject.class, self.getRuntime().getNil()))
.cast(fieldHandle.type())
origin: org.projectodd.rephract/rephract

public GuardBuilder filter(int index, MethodHandle... functions) {
  binder = binder.filter(index, functions);
  return this;
}
origin: com.ning.billing/killbill-osgi-bundles-jruby

.filter(0, parameterFilters)
.filterReturn(resultFilter)
.invoke(nativeInvoker);
origin: com.headius/invokebinder

/**
 * Filter incoming arguments, from the given index, replacing each with the
 * result of calling the associated function in the given list. This version
 * guarantees left-to-right evaluation of filter functions, potentially at
 * the cost of a more complex handle tree.
 *
 * @param index     the index of the first argument to filter
 * @param functions the array of functions to transform the arguments
 * @return a new Binder
 */
public Binder filterForward(int index, MethodHandle... functions) {
  Binder filtered = this;
  for (int i = 0; i < functions.length; i++) {
    filtered = filtered.filter(index + i, functions[i]);
  }
  return filtered;
}
origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

.filter(0, parameterFilters)
.filterReturn(resultFilter)
.invoke(nativeInvoker);
origin: org.projectodd.rephract/rephract

public GuardBuilder filter(int index, Filter filter) throws Exception {
  MethodHandle methodHandle = filter.methodHandle( methodType(binder.type().parameterType(index), binder.type().parameterType(index)) );
  binder = binder.filter(index, methodHandle );
  return this;
}
origin: org.jruby/jruby-complete

  public MethodHandle getNormalYieldUnwrapHandle() {
    MethodHandle normalYieldUnwrapHandle = this.normalYieldUnwrapHandle;
    if (normalYieldUnwrapHandle != null) return normalYieldUnwrapHandle;

    return this.normalYieldUnwrapHandle = Binder.from(IRubyObject.class, ThreadContext.class, Block.class, IRubyObject.class)
        .filter(2, VALUE_TO_ARRAY)
        .insert(2, new Class[] {StaticScope.class, IRubyObject.class}, getStaticScope(), null)
        .append(Block.class, Block.NULL_BLOCK)
        .invoke(handle);
  }
//
origin: org.jruby/jruby-complete

public MethodHandle getNormalYieldHandle() {
  MethodHandle normalYieldHandle = this.normalYieldHandle;
  if (normalYieldHandle != null) return normalYieldHandle;
  return this.normalYieldHandle = Binder.from(IRubyObject.class, ThreadContext.class, Block.class, IRubyObject.class)
      .filter(2, WRAP_VALUE)
      .insert(2, new Class[]{StaticScope.class, IRubyObject.class}, getStaticScope(), null)
      .append(Block.class, Block.NULL_BLOCK)
      .invoke(handle);
}
origin: org.jruby/jruby-core

  public MethodHandle getNormalYieldUnwrapHandle() {
    MethodHandle normalYieldUnwrapHandle = this.normalYieldUnwrapHandle;
    if (normalYieldUnwrapHandle != null) return normalYieldUnwrapHandle;

    return this.normalYieldUnwrapHandle = Binder.from(IRubyObject.class, ThreadContext.class, Block.class, IRubyObject.class)
        .filter(2, VALUE_TO_ARRAY)
        .insert(2, new Class[] {StaticScope.class, IRubyObject.class}, getStaticScope(), null)
        .append(Block.class, Block.NULL_BLOCK)
        .invoke(handle);
  }
//
origin: org.jruby/jruby-core

public MethodHandle getNormalYieldHandle() {
  MethodHandle normalYieldHandle = this.normalYieldHandle;
  if (normalYieldHandle != null) return normalYieldHandle;
  return this.normalYieldHandle = Binder.from(IRubyObject.class, ThreadContext.class, Block.class, IRubyObject.class)
      .filter(2, WRAP_VALUE)
      .insert(2, new Class[]{StaticScope.class, IRubyObject.class}, getStaticScope(), null)
      .append(Block.class, Block.NULL_BLOCK)
      .invoke(handle);
}
origin: com.headius/invokebinder

/**
 * Filter the arguments matching the given pattern using the given filter function.
 *
 * @param pattern the regular expression pattern to match arguments
 * @param filter the MethodHandle to use to filter the arguments
 * @return a new SmartBinder with the filter applied
 */
public SmartBinder filter(String pattern, MethodHandle filter) {
  String[] argNames = signature().argNames();
  Pattern pat = Pattern.compile(pattern);
  Binder newBinder = binder();
  Signature newSig = signature();
  for (int i = 0; i < argNames.length; i++) {
    if (pat.matcher(argNames[i]).matches()) {
      newBinder = newBinder.filter(i, filter);
      newSig = newSig.argType(i, filter.type().returnType());
    }
  }
  return new SmartBinder(newSig, newBinder);
}
origin: com.ning.billing/killbill-osgi-bundles-jruby

.filter(0, guards)
.invoke(isTrue);
origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

.filter(0, guards)
.invoke(isTrue);
com.headius.invokebinderBinderfilter

Javadoc

Filter incoming arguments, from the given index, replacing each with the result of calling the associated function in the given list. Note that the order in which the filters are applied is undefined; OpenJDK produces handles that execute them in reverse order.

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.
  • 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
  • invokeStaticQuiet
    Apply the chain of transforms and bind them to a static method specified using the end signature plu
  • filterReturn,
  • invokeStaticQuiet,
  • invokeVirtualQuiet,
  • tryFinally,
  • nop,
  • type,
  • append,
  • foldVoid,
  • identity

Popular in Java

  • Finding current android device location
  • putExtra (Intent)
  • getExternalFilesDir (Context)
  • onRequestPermissionsResult (Fragment)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • JCheckBox (javax.swing)
  • Runner (org.openjdk.jmh.runner)
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top PhpStorm 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