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

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

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

origin: org.projectodd.rephract/rephract

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

public MultiBinder insert(int index, Class[] types, Object... values) {
  this.invokeBinder = invokeBinder.insert(index, types, values);
  this.guardBinder = guardBinder.insert(index, types, values);
  return this;
}
origin: org.jruby/jruby-complete

protected final MethodHandle newIdTest() {
  return Binder.from(boolean.class, ThreadContext.class, IRubyObject.class)
      .insert(2, id)
      .invoke(testModuleMatch);
}
origin: com.ning.billing/killbill-osgi-bundles-jruby

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

public static CallSite searchConst(Lookup lookup, String name, MethodType type) {
  MutableCallSite site = new MutableCallSite(type);
  String[] bits = name.split(":");
  String constName = bits[1];
  MethodHandle handle = Binder
      .from(type)
      .insert(0, site, constName)
      .invokeStaticQuiet(MethodHandles.lookup(), Bootstrap.class, "searchConst");
  site.setTarget(handle);
  return site;
}
origin: org.jruby/jruby-complete

private MethodHandle noCacheSMFC() {
  if (_noCacheSMFC != null) return _noCacheSMFC;
  return _noCacheSMFC = Binder.from(type())
      .insert(0, this)
      .invokeVirtualQuiet(Bootstrap.LOOKUP, "noCacheSearchModuleForConst");
}
origin: org.jruby/jruby-complete

public CallSite bootstrap(MethodHandles.Lookup lookup) {
  MethodHandle handle = prepareBinder()
      .insert(0, this)
      .invokeVirtualQuiet(lookup, "construct");
  setTarget(handle);
  return this;
}
origin: org.jruby/jruby-complete

private MethodHandle SMFC() {
  if (_SMFC != null) return _SMFC;
  return _SMFC = Binder.from(type())
      .insert(0, this)
      .invokeVirtualQuiet(Bootstrap.LOOKUP, "searchModuleForConst");
}
origin: org.jruby/jruby-complete

private MethodHandle ISC() {
  if (_ISC != null) return _ISC;
  return _ISC = Binder.from(type())
      .insert(0, this)
      .invokeVirtualQuiet(Bootstrap.LOOKUP, "inheritanceSearchConst");
}
origin: org.jruby/jruby-core

private MethodHandle noCacheSMFC() {
  if (_noCacheSMFC != null) return _noCacheSMFC;
  return _noCacheSMFC = Binder.from(type())
      .insert(0, this)
      .invokeVirtualQuiet(Bootstrap.LOOKUP, "noCacheSearchModuleForConst");
}
origin: com.headius/invokebinder

/**
 * Insert an argument into the argument list at the given index with the
 * given name and value.
 *
 * @param index the index at which to insert the argument
 * @param name  the name of the new argument
 * @param value the value of the new argument
 * @return a new SmartBinder with the insert applied
 */
public SmartBinder insert(int index, String name, boolean value) {
  return new SmartBinder(this, signature().insertArg(index, name, boolean.class), binder.insert(index, value));
}
origin: org.jruby/jruby-core

private MethodHandle ISC() {
  if (_ISC != null) return _ISC;
  return _ISC = Binder.from(type())
      .insert(0, this)
      .invokeVirtualQuiet(Bootstrap.LOOKUP, "inheritanceSearchConst");
}
origin: org.jruby/jruby-core

public CallSite bootstrap(MethodHandles.Lookup lookup) {
  MethodHandle handle = prepareBinder()
      .insert(0, this)
      .invokeVirtualQuiet(lookup, "construct");
  setTarget(handle);
  return this;
}
origin: org.jruby/jruby-complete

public boolean init(IRubyObject obj) {
  Ruby runtime = obj.getRuntime();
  IRubyObject nil = runtime.getNil();
  IRubyObject fals = runtime.getFalse();
  setTarget(
      Binder.from(type())
          .insert(0, RubyBoolean.False.class, fals)
          .insert(0, RubyNil.class, nil)
          .invokeStaticQuiet(LOOKUP, IsTrueSite.class, "isTruthy")
  );
  return nil != obj && fals != obj;
}
origin: org.jruby/jruby-complete

public static CallSite constLookup(MethodHandles.Lookup lookup, String searchType, MethodType type, String constName, int publicOnly, int callConstMissing) {
  ConstantLookupSite site = new ConstantLookupSite(type, constName, publicOnly == 0 ? false : true, callConstMissing == 0 ? false : true);
  MethodHandle handle = Binder
      .from(lookup, type)
      .insert(0, site)
      .invokeVirtualQuiet(lookup, searchType);
  site.setTarget(handle);
  return site;
}
origin: org.jruby/jruby-core

public static CallSite constLookup(MethodHandles.Lookup lookup, String searchType, MethodType type, String constName, int publicOnly, int callConstMissing) {
  ConstantLookupSite site = new ConstantLookupSite(type, constName, publicOnly == 0 ? false : true, callConstMissing == 0 ? false : true);
  MethodHandle handle = Binder
      .from(lookup, type)
      .insert(0, site)
      .invokeVirtualQuiet(lookup, searchType);
  site.setTarget(handle);
  return site;
}
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 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-complete

public boolean init(IRubyObject obj) {
  IRubyObject nil = obj.getRuntime().getNil();
  setTarget(
      Binder.from(type())
          .insert(0, RubyNil.class, nil)
          .invokeStaticQuiet(LOOKUP, IsNilSite.class, "isNil")
  );
  return nil == obj;
}
origin: org.jruby/jruby-core

public static CallSite string(Lookup lookup, String name, MethodType type, String value, String encodingName, int cr) {
  MutableCallSite site = new MutableCallSite(type);
  Binder binder = Binder
      .from(RubyString.class, ThreadContext.class)
      .insert(0, arrayOf(MutableCallSite.class, ByteList.class, int.class), site, bytelist(value, encodingName), cr);
  site.setTarget(binder.invokeStaticQuiet(lookup, Bootstrap.class, "string"));
  return site;
}
com.headius.invokebinderBinderinsert

Javadoc

Insert at the given index the given byte value.

Popular methods of Binder

  • from
    Construct a new Binder, starting from a given MethodType.
  • 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
  • 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
  • setContentView (Activity)
  • getResourceAsStream (ClassLoader)
  • compareTo (BigDecimal)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • From CI to AI: The AI layer in your organization
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