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

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

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

origin: com.headius/invokebinder

/**
 * Prepend the given argument to the argument list, assigning it the
 * given name.
 *
 * @param name  the name of the new argument
 * @param value the value of the new argument
 * @return a new SmartBinder with the prepend applied
 */
public SmartBinder prepend(String name, Object value) {
  return new SmartBinder(this, signature().prependArg(name, value.getClass()), binder.prepend(value));
}
origin: com.headius/invokebinder

/**
 * Prepend the given argument to the argument list, assigning it the
 * given name.
 *
 * @param name  the name of the new argument
 * @param value the value of the new argument
 * @return a new SmartBinder with the prepend applied
 */
public SmartBinder prepend(String name, byte value) {
  return new SmartBinder(this, signature().prependArg(name, byte.class), binder.prepend(value));
}
origin: com.headius/invokebinder

/**
 * Prepend the given argument to the argument list, assigning it the
 * given name.
 *
 * @param name  the name of the new argument
 * @param value the value of the new argument
 * @return a new SmartBinder with the prepend applied
 */
public SmartBinder prepend(String name, boolean value) {
  return new SmartBinder(this, signature().prependArg(name, boolean.class), binder.prepend(value));
}
origin: com.headius/invokebinder

/**
 * Prepend the given argument to the argument list, assigning it the
 * given name.
 *
 * @param name  the name of the new argument
 * @param value the value of the new argument
 * @return a new SmartBinder with the prepend applied
 */
public SmartBinder prepend(String name, float value) {
  return new SmartBinder(this, signature().prependArg(name, float.class), binder.prepend(value));
}
origin: com.headius/invokebinder

/**
 * Prepend the given argument to the argument list, assigning it the
 * given name.
 *
 * @param name  the name of the new argument
 * @param value the value of the new argument
 * @return a new SmartBinder with the prepend applied
 */
public SmartBinder prepend(String name, double value) {
  return new SmartBinder(this, signature().prependArg(name, double.class), binder.prepend(value));
}
origin: com.headius/invokebinder

/**
 * Prepend the given argument to the argument list, assigning it the
 * given name.
 *
 * @param name  the name of the new argument
 * @param value the value of the new argument
 * @return a new SmartBinder with the prepend applied
 */
public SmartBinder prepend(String name, char value) {
  return new SmartBinder(this, signature().prependArg(name, char.class), binder.prepend(value));
}
origin: com.headius/invokebinder

/**
 * Prepend the given argument to the argument list, assigning it the
 * given name.
 *
 * @param name  the name of the new argument
 * @param value the value of the new argument
 * @return a new SmartBinder with the prepend applied
 */
public SmartBinder prepend(String name, long value) {
  return new SmartBinder(this, signature().prependArg(name, long.class), binder.prepend(value));
}
origin: com.headius/invokebinder

/**
 * Prepend the given argument to the argument list, assigning it the
 * given name.
 *
 * @param name  the name of the new argument
 * @param value the value of the new argument
 * @return a new SmartBinder with the prepend applied
 */
public SmartBinder prepend(String name, short value) {
  return new SmartBinder(this, signature().prependArg(name, short.class), binder.prepend(value));
}
origin: com.headius/invokebinder

/**
 * Prepend the given argument to the argument list, assigning it the
 * given name.
 *
 * @param name  the name of the new argument
 * @param value the value of the new argument
 * @return a new SmartBinder with the prepend applied
 */
public SmartBinder prepend(String name, int value) {
  return new SmartBinder(this, signature().prependArg(name, int.class), binder.prepend(value));
}
origin: com.headius/invokebinder

/**
 * Prepend the given argument to the argument list, assigning it the
 * given name.
 *
 * @param name  the name of the new argument
 * @param type  the type to use in the new signature
 * @param value the value of the new argument
 * @return a new SmartBinder with the prepend applied
 */
public SmartBinder prepend(String name, Class<?> type, Object value) {
  return new SmartBinder(this, signature().prependArg(name, type), binder.prepend(type, value));
}
origin: com.headius/invokebinder

/**
 * Prepend the given arguments to the argument list, assigning them the
 * given name.
 *
 * @param names  the names of the new arguments
 * @param types  the types to use in the new signature
 * @param values the values of the new arguments
 * @return a new SmartBinder with the prepend applied
 */
public SmartBinder prepend(String[] names, Class<?>[] types, Object... values) {
  return new SmartBinder(this, signature().prependArgs(names, types), binder.prepend(types, values));
}
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.jruby/jruby-complete

private static MethodHandle createAttrReaderHandle(InvokeSite site, IRubyObject self, RubyClass cls, VariableAccessor accessor) {
  MethodHandle nativeTarget;
  MethodHandle filter = cls.getClassRuntime().getNullToNilHandle();
  MethodHandle getValue;
  if (accessor instanceof FieldVariableAccessor) {
    MethodHandle getter = ((FieldVariableAccessor)accessor).getGetter();
    getValue = Binder.from(site.type())
        .drop(0, 2)
        .filterReturn(filter)
        .cast(methodType(Object.class, self.getClass()))
        .invoke(getter);
  } else {
    getValue = Binder.from(site.type())
        .drop(0, 2)
        .filterReturn(filter)
        .cast(methodType(Object.class, Object.class))
        .prepend(accessor)
        .invokeVirtualQuiet(LOOKUP, "get");
  }
  // NOTE: Must not cache the fully-bound handle in the method, since it's specific to this class
  return getValue;
}
origin: org.jruby/jruby-core

private static MethodHandle createAttrReaderHandle(InvokeSite site, IRubyObject self, RubyClass cls, VariableAccessor accessor) {
  MethodHandle nativeTarget;
  MethodHandle filter = cls.getClassRuntime().getNullToNilHandle();
  MethodHandle getValue;
  if (accessor instanceof FieldVariableAccessor) {
    MethodHandle getter = ((FieldVariableAccessor)accessor).getGetter();
    getValue = Binder.from(site.type())
        .drop(0, 2)
        .filterReturn(filter)
        .cast(methodType(Object.class, self.getClass()))
        .invoke(getter);
  } else {
    getValue = Binder.from(site.type())
        .drop(0, 2)
        .filterReturn(filter)
        .cast(methodType(Object.class, Object.class))
        .prepend(accessor)
        .invokeVirtualQuiet(LOOKUP, "get");
  }
  // NOTE: Must not cache the fully-bound handle in the method, since it's specific to this class
  return getValue;
}
origin: org.jruby/jruby-complete

private static MethodHandle createAttrWriterHandle(InvokeSite site, IRubyObject self, RubyClass cls, VariableAccessor accessor) {
  MethodHandle nativeTarget;
  MethodHandle filter = Binder
      .from(IRubyObject.class, Object.class)
      .drop(0)
      .constant(cls.getRuntime().getNil());
  MethodHandle setValue;
  if (accessor instanceof FieldVariableAccessor) {
    MethodHandle setter = ((FieldVariableAccessor)accessor).getSetter();
    setValue = Binder.from(site.type())
        .drop(0, 2)
        .filterReturn(filter)
        .cast(methodType(void.class, self.getClass(), Object.class))
        .invoke(setter);
  } else {
    setValue = Binder.from(site.type())
        .drop(0, 2)
        .filterReturn(filter)
        .cast(methodType(void.class, Object.class, Object.class))
        .prepend(accessor)
        .invokeVirtualQuiet(LOOKUP, "set");
  }
  return setValue;
}
origin: org.jruby/jruby-core

private static MethodHandle createAttrWriterHandle(InvokeSite site, IRubyObject self, RubyClass cls, VariableAccessor accessor) {
  MethodHandle nativeTarget;
  MethodHandle filter = Binder
      .from(IRubyObject.class, Object.class)
      .drop(0)
      .constant(cls.getRuntime().getNil());
  MethodHandle setValue;
  if (accessor instanceof FieldVariableAccessor) {
    MethodHandle setter = ((FieldVariableAccessor)accessor).getSetter();
    setValue = Binder.from(site.type())
        .drop(0, 2)
        .filterReturn(filter)
        .cast(methodType(void.class, self.getClass(), Object.class))
        .invoke(setter);
  } else {
    setValue = Binder.from(site.type())
        .drop(0, 2)
        .filterReturn(filter)
        .cast(methodType(void.class, Object.class, Object.class))
        .prepend(accessor)
        .invokeVirtualQuiet(LOOKUP, "set");
  }
  return setValue;
}
com.headius.invokebinderBinderprepend

Javadoc

Prepend to the argument list the given byte value.

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,
  • foldVoid,
  • identity

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSupportFragmentManager (FragmentActivity)
  • setRequestProperty (URLConnection)
  • runOnUiThread (Activity)
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Collectors (java.util.stream)
  • 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