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

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

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

origin: org.projectodd.rephract/rephract

public MultiBinder collect(int index, Class type) {
  this.invokeBinder = invokeBinder.collect(index, type);
  this.guardBinder = guardBinder.collect(index, type);
  return this;
}
origin: org.projectodd.rephract/rephract

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

public static CallSite array(Lookup lookup, String name, MethodType type) {
  MethodHandle handle = Binder
      .from(type)
      .collect(1, IRubyObject[].class)
      .invokeStaticQuiet(MethodHandles.lookup(), Bootstrap.class, "array");
  CallSite site = new ConstantCallSite(handle);
  return site;
}
origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

public static CallSite array(Lookup lookup, String name, MethodType type) {
  MethodHandle handle = Binder
      .from(type)
      .collect(1, IRubyObject[].class)
      .invokeStaticQuiet(MethodHandles.lookup(), Bootstrap.class, "array");
  CallSite site = new ConstantCallSite(handle);
  return site;
}
origin: org.jruby/jruby-core

public static CallSite kwargsHash(Lookup lookup, String name, MethodType type) {
  MethodHandle handle = Binder
      .from(lookup, type)
      .collect(2, IRubyObject[].class)
      .invokeStaticQuiet(LOOKUP, Bootstrap.class, "kwargsHash");
  CallSite site = new ConstantCallSite(handle);
  return site;
}
origin: org.jruby/jruby-complete

public static CallSite array(Lookup lookup, String name, MethodType type) {
  MethodHandle handle = Binder
      .from(type)
      .collect(1, IRubyObject[].class)
      .invokeStaticQuiet(LOOKUP, Bootstrap.class, "array");
  CallSite site = new ConstantCallSite(handle);
  return site;
}
origin: org.jruby/jruby-complete

public static CallSite kwargsHash(Lookup lookup, String name, MethodType type) {
  MethodHandle handle = Binder
      .from(lookup, type)
      .collect(2, IRubyObject[].class)
      .invokeStaticQuiet(LOOKUP, Bootstrap.class, "kwargsHash");
  CallSite site = new ConstantCallSite(handle);
  return site;
}
origin: org.jruby/jruby-complete

public static CallSite hash(Lookup lookup, String name, MethodType type) {
  MethodHandle handle = Binder
      .from(lookup, type)
      .collect(1, IRubyObject[].class)
      .invokeStaticQuiet(LOOKUP, Bootstrap.class, "hash");
  CallSite site = new ConstantCallSite(handle);
  return site;
}
origin: org.jruby/jruby-core

public static CallSite hash(Lookup lookup, String name, MethodType type) {
  MethodHandle handle = Binder
      .from(lookup, type)
      .collect(1, IRubyObject[].class)
      .invokeStaticQuiet(LOOKUP, Bootstrap.class, "hash");
  CallSite site = new ConstantCallSite(handle);
  return site;
}
origin: org.jruby/jruby-core

public static CallSite array(Lookup lookup, String name, MethodType type) {
  MethodHandle handle = Binder
      .from(type)
      .collect(1, IRubyObject[].class)
      .invokeStaticQuiet(LOOKUP, Bootstrap.class, "array");
  CallSite site = new ConstantCallSite(handle);
  return site;
}
origin: com.headius/invokebinder

private Binder preparePermuteBinder(Permutes permutes) {
  return Binder.from(source)
      .permute(permutes.movePermute)
      .collect(source.parameterCount() - count, arrayType)
      .permute(permutes.moveBackPermute);
}
origin: com.headius/invokebinder

/**
 * Collect arguments matching namePattern into an trailing array argument
 * named outName.
 *
 * The namePattern is a standard regular expression.
 *
 * @param outName     the name of the new array argument
 * @param namePattern a pattern with which to match arguments for collecting
 * @return a new SmartBinder with the collect applied
 */
public SmartBinder collect(String outName, String namePattern) {
  int index = signature().argOffsets(namePattern);
  assert index >= 0 : "no arguments matching " + namePattern + " found in signature " + signature();
  Signature newSignature = signature().collect(outName, namePattern);
  return new SmartBinder(this, newSignature, binder.collect(index, signature().argCount() - (newSignature.argCount() - 1), Array.newInstance(signature().argType(index), 0).getClass()));
}
origin: org.projectodd.rephract/rephract

public MethodHandle possiblyDebugGuard(Entry entry, int position, MethodHandle input) throws NoSuchMethodException, IllegalAccessException {
  if (!debug) {
    return input;
  }
  MethodHandle debugMh = MethodHandles.lookup()
      .findStatic(LinkPlan.class, "debugGuard", MethodType.methodType(boolean.class, LinkPlan.class, LinkPlan.Entry.class, int.class, MethodHandle.class, Object[].class));
  debugMh = Binder.from(input.type())
      .convert(input.type().erase())
      .collect(0, Object[].class)
      .insert(0, input)
      .insert(0, position)
      .insert(0, entry)
      .insert(0, this)
      .invoke(debugMh);
  return debugMh;
}
origin: org.jruby/jruby-complete

public static CallSite bootstrap(MethodHandles.Lookup lookup, String name, MethodType type, int unwrap) throws Throwable {
  YieldSite site = new YieldSite(type, unwrap == 1 ? true : false);
  MethodHandle handle;
  switch (name) {
    case "yield":
    case "yieldSpecific":
      handle = Binder.from(type)
          .prepend(YieldSite.class, site)
          .invokeVirtual(lookup, name);
      break;
    case "yieldValues":
      handle = Binder.from(type)
          .collect(2, IRubyObject[].class)
          .prepend(YieldSite.class, site)
          .invokeVirtual(lookup, name);
      break;
    default:
      throw new RuntimeException("invalid yield type: " + name);
  }
  site.setTarget(handle);
  return site;
}
origin: org.jruby/jruby-core

public static CallSite bootstrap(MethodHandles.Lookup lookup, String name, MethodType type, int unwrap) throws Throwable {
  YieldSite site = new YieldSite(type, unwrap == 1 ? true : false);
  MethodHandle handle;
  switch (name) {
    case "yield":
    case "yieldSpecific":
      handle = Binder.from(type)
          .prepend(YieldSite.class, site)
          .invokeVirtual(lookup, name);
      break;
    case "yieldValues":
      handle = Binder.from(type)
          .collect(2, IRubyObject[].class)
          .prepend(YieldSite.class, site)
          .invokeVirtual(lookup, name);
      break;
    default:
      throw new RuntimeException("invalid yield type: " + name);
  }
  site.setTarget(handle);
  return site;
}
origin: org.projectodd.rephract/rephract

public LinkPlan(RephractLinker linker, MutableCallSite callSite, Lookup lookup, String name, MethodType type, Location location) throws NoSuchMethodException, IllegalAccessException {
  this.linker = linker;
  this.callSite = callSite;
  this.lookup = lookup;
  this.name = name;
  this.type = type;
  this.location = location;
  this.relink = Binder.from(this.type)
      .convert(this.type.erase())
      .collect(0, Object[].class)
      .convert(Object.class, Object[].class)
      .insert(0, this)
      .invoke(LINK_INVOCATION);
  determineOperations();
  replan(null, null, null, null);
}
com.headius.invokebinderBindercollect

Javadoc

Box a range of incoming arguments into the given array type.

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

  • Reactive rest calls using spring rest template
  • scheduleAtFixedRate (Timer)
  • getResourceAsStream (ClassLoader)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • JOptionPane (javax.swing)
  • Best IntelliJ 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