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

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

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

origin: org.projectodd.rephract/rephract

public MultiBinder drop(int index, int count) {
  this.invokeBinder = invokeBinder.drop(index, count);
  this.guardBinder = guardBinder.drop(index, count);
  return this;
}
origin: com.headius/invokebinder

/**
 * Drop a single argument at the given index.
 *
 * @param index the index at which to drop an argument
 * @return a new Binder
 */
public Binder drop(int index) {
  return drop(index, 1);
}
origin: org.projectodd.rephract/rephract

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

public GuardBuilder drop(int index) {
  binder = binder.drop(index);
  return this;
}
origin: com.headius/invokebinder

/**
 * Drop all arguments from this handle chain
 *
 * @return a new Binder
 */
public Binder dropAll() {
  return drop(0, type().parameterCount());
}
origin: com.headius/invokebinder

/**
 * Drop from the end of the argument list a number of arguments.
 *
 * @param count the number of arguments to drop
 * @return a new Binder
 */
public Binder dropFirst(int count) {
  assert count <= type().parameterCount();
  return drop(0, count);
}
origin: org.jruby/jruby-complete

public MethodHandle getTestBlockBody() {
  final MethodHandle testBlockBody = this.testBlockBody;
  if (testBlockBody != null) return testBlockBody;
  return this.testBlockBody = Binder.from(boolean.class, ThreadContext.class, Block.class).drop(0).append(this).invoke(TEST_BLOCK_BODY);
}
origin: org.projectodd.rephract/rephract

  @Override
  public MethodHandle guardMethodHandle(MethodType inputType) throws Exception {
    Binder binder = Binder.from(inputType);
    return binder.drop(0, inputType.parameterCount())
        .constant(false);
  }
}
origin: org.projectodd.rephract/rephract

protected MethodHandle selfFilter(Class<?> selfType) throws NoSuchMethodException, IllegalAccessException {
  return Binder.from(MethodType.methodType(selfType, Object.class))
      .drop(0)
      .insert(0, this.self)
      .invoke(MethodHandles.identity(Object.class));
}
origin: org.jruby/jruby-core

public MethodHandle getTestBlockBody() {
  final MethodHandle testBlockBody = this.testBlockBody;
  if (testBlockBody != null) return testBlockBody;
  return this.testBlockBody = Binder.from(boolean.class, ThreadContext.class, Block.class).drop(0).append(this).invoke(TEST_BLOCK_BODY);
}
origin: org.projectodd.rephract/rephract

  @Override
  public MethodHandle guardMethodHandle(MethodType inputType) throws Exception {
    Binder binder = Binder.from(inputType);
    return binder.drop(0, inputType.parameterCount())
        .constant(true);
  }
}
origin: com.ning.billing/killbill-osgi-bundles-jruby

public static IRubyObject symbol(MutableCallSite site, String name, ThreadContext context) {
  RubySymbol symbol = RubySymbol.newSymbol(context.runtime, name);
  site.setTarget(Binder
      .from(IRubyObject.class, ThreadContext.class)
      .drop(0)
      .constant(symbol)
  );
  return symbol;
}
origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

public static IRubyObject fixnum(MutableCallSite site, long value, ThreadContext context) {
  RubyFixnum fixnum = RubyFixnum.newFixnum(context.runtime, value);
  site.setTarget(Binder
      .from(IRubyObject.class, ThreadContext.class)
      .drop(0)
      .constant(fixnum)
  );
  return fixnum;
}
origin: com.headius/invokebinder

/**
 * Drop from the end of the argument list a number of arguments.
 *
 * @param count the number of arguments to drop
 * @return a new Binder
 */
public Binder dropLast(int count) {
  assert count <= type().parameterCount();
  return drop(type().parameterCount() - count, count);
}
origin: com.ning.billing/killbill-osgi-bundles-jruby

public static IRubyObject fixnum(MutableCallSite site, long value, ThreadContext context) {
  RubyFixnum fixnum = RubyFixnum.newFixnum(context.runtime, value);
  site.setTarget(Binder
      .from(IRubyObject.class, ThreadContext.class)
      .drop(0)
      .constant(fixnum)
  );
  return fixnum;
}
origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

  public static IRubyObject flote(MutableCallSite site, double value, ThreadContext context) {
    RubyFloat flote = RubyFloat.newFloat(context.runtime, value);
    site.setTarget(Binder
        .from(IRubyObject.class, ThreadContext.class)
        .drop(0)
        .constant(flote)
    );
    return flote;
  }
}
origin: com.ning.billing/killbill-osgi-bundles-jruby

  public static IRubyObject flote(MutableCallSite site, double value, ThreadContext context) {
    RubyFloat flote = RubyFloat.newFloat(context.runtime, value);
    site.setTarget(Binder
        .from(IRubyObject.class, ThreadContext.class)
        .drop(0)
        .constant(flote)
    );
    return flote;
  }
}
origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

public static IRubyObject symbol(MutableCallSite site, String name, ThreadContext context) {
  RubySymbol symbol = RubySymbol.newSymbol(context.runtime, name);
  site.setTarget(Binder
      .from(IRubyObject.class, ThreadContext.class)
      .drop(0)
      .constant(symbol)
  );
  return symbol;
}
origin: com.headius/invokebinder

/**
 * Drop the argument with the given name.
 *
 * @param name the name of the argument to drop
 * @return a new SmartBinder with the drop applied
 */
public SmartBinder drop(String name) {
  int index = signature().argOffset(name);
  return new SmartBinder(this, signature().dropArg(index), binder.drop(index));
}
origin: org.jruby/jruby-complete

private void bind(Ruby runtime, RubyModule module, IRubyObject constant, MethodHandle cachingFallback) {
  MethodHandle target = Binder.from(type())
      .drop(0, 2)
      .constant(constant);
  // Get appropriate fallback given state of site
  MethodHandle fallback = getFallback(module, cachingFallback);
  // Test that module is same as before
  target = guardWithTest(module.getIdTest(), target, fallback);
  // Global invalidation
  SwitchPoint switchPoint = (SwitchPoint) runtime.getConstantInvalidator(name).getData();
  target = switchPoint.guardWithTest(target, fallback);
  setTarget(target);
}
com.headius.invokebinderBinderdrop

Javadoc

Drop a single argument at the given index.

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

  • Running tasks concurrently on multiple threads
  • getResourceAsStream (ClassLoader)
  • addToBackStack (FragmentTransaction)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • CodeWhisperer alternatives
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