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

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

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

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.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: com.headius/invokebinder

/**
 * Cast the incoming arguments to the given MethodType. The casts
 * applied are equivalent to those in MethodHandle.explicitCastArguments(MethodType).
 *
 * @param returnType the target return type
 * @param firstType  the first argument type, usually a target type
 * @param restTypes  the remaining target argument types
 * @return a new Binder
 */
public Binder castVirtual(Class<?> returnType, Class<?> firstType, Class<?>... restTypes) {
  return new Binder(this, new Cast(type()), MethodType.methodType(returnType, firstType, restTypes));
}
origin: com.headius/invokebinder

/**
 * Cast the incoming arguments to the given MethodType. The casts
 * applied are equivalent to those in MethodHandle.explicitCastArguments(MethodType).
 *
 * @param returnType the target return type
 * @param argTypes   the target argument types
 * @return a new Binder
 */
public Binder cast(Class<?> returnType, Class<?>... argTypes) {
  return new Binder(this, new Cast(type()), MethodType.methodType(returnType, argTypes));
}
origin: com.headius/invokebinder

/**
 * Convert the incoming arguments to the given MethodType. The conversions
 * applied are equivalent to those in MethodHandle.asType(MethodType).
 *
 * @param returnType the target return type
 * @param argTypes   the target argument types
 * @return a new Binder
 */
public Binder convert(Class<?> returnType, Class<?>... argTypes) {
  return new Binder(this, new Convert(type()), MethodType.methodType(returnType, argTypes));
}
origin: com.headius/invokebinder

/**
 * Convert the incoming arguments to the given MethodType. The conversions
 * applied are equivalent to those in MethodHandle.asType(MethodType).
 *
 * @param target the target MethodType
 * @return a new Binder
 */
public Binder convert(MethodType target) {
  return new Binder(this, new Convert(type()), target);
}
origin: com.headius/invokebinder

/**
 * Box a range of incoming arguments into the given array type.
 *
 * @param index the index from which to start boxing args
 * @param count the count of arguments to box
 * @param type  the array type into which the args will be boxed
 * @return a new Binder
 */
public Binder collect(int index, int count, Class<?> type) {
  return new Binder(this, new Collect(type(), index, count, type));
}
origin: com.headius/invokebinder

/**
 * Apply the chain of transforms and bind them to an array element set. The signature
 * at the endpoint must return void and receive the array type, int index, and array
 * element type.
 *
 * @return the full handle chain, bound to an array element set.
 */
public MethodHandle arraySet() {
  return invoke(MethodHandles.arrayElementSetter(type().parameterType(0)));
}
origin: com.headius/invokebinder

/**
 * Process the incoming arguments by calling the given method on the first
 * argument, inserting the result as the first argument.
 *
 * @param lookup the java.lang.invoke.MethodHandles.Lookup to use
 * @param method the method to invoke on the first argument
 * @return a new Binder
 */
public Binder foldVirtual(MethodHandles.Lookup lookup, String method) {
  return fold(Binder.from(type()).invokeVirtualQuiet(lookup, method));
}
origin: com.headius/invokebinder

/**
 * Cast the incoming arguments to the given MethodType. The casts
 * applied are equivalent to those in MethodHandles.explicitCastArguments(mh, MethodType).
 *
 * @param type the target MethodType
 * @return a new Binder
 */
public Binder cast(MethodType type) {
  return new Binder(this, new Cast(type()), type);
}
origin: com.headius/invokebinder

/**
 * Box all incoming arguments from the given position onward into the given array type.
 *
 * @param index the index from which to start boxing args
 * @param type  the array type into which the args will be boxed
 * @return a new Binder
 */
public Binder collect(int index, Class<?> type) {
  return new Binder(this, new Collect(type(), index, type));
}
origin: com.headius/invokebinder

/**
 * Apply the chain of transforms and bind them to an array element get. The signature
 * at the endpoint must return the array element type and receive the array type and
 * int index.
 *
 * @return the full handle chain, bound to an array element get.
 */
public MethodHandle arrayGet() {
  return invoke(MethodHandles.arrayElementGetter(type().parameterType(0)));
}
origin: com.headius/invokebinder

/**
 * Apply the chain of transforms and bind them to an array varhandle operation. The
 * signature at the endpoint must match the VarHandle access type passed in.
 */
public MethodHandle arrayAccess(VarHandle.AccessMode mode) {
  return invoke(MethodHandles.arrayElementVarHandle(type().parameterType(0)).toMethodHandle(mode));
}
origin: com.headius/invokebinder

/**
 * Append to the argument list the given argument value(s).
 *
 * @param values the value(s) to append
 * @return a new Binder
 */
public Binder append(Object... values) {
  return new Binder(this, new Insert(type().parameterCount(), values));
}
origin: com.headius/invokebinder

/**
 * Append to the argument list the given short value.
 *
 * @param value the value to append
 * @return a new Binder
 */
public Binder append(short value) {
  return new Binder(this, new Insert(type().parameterCount(), value));
}
origin: com.headius/invokebinder

/**
 * Append to the argument list the given float value.
 *
 * @param value the value to append
 * @return a new Binder
 */
public Binder append(float value) {
  return new Binder(this, new Insert(type().parameterCount(), value));
}
origin: com.headius/invokebinder

/**
 * Append to the argument list the given double value.
 *
 * @param value the value to append
 * @return a new Binder
 */
public Binder append(double value) {
  return new Binder(this, new Insert(type().parameterCount(), value));
}
origin: com.headius/invokebinder

/**
 * Append to the argument list the given argument value with the specified type.
 *
 * @param type  the actual type to use, rather than getClass
 * @param value the value to append
 * @return a new Binder
 */
public Binder append(Class<?> type, Object value) {
  return new Binder(this, new Insert(type().parameterCount(), new Class[]{type}, value));
}
origin: com.headius/invokebinder

/**
 * Append to the argument list the given int value.
 *
 * @param value the value to append
 * @return a new Binder
 */
public Binder append(int value) {
  return new Binder(this, new Insert(type().parameterCount(), value));
}
origin: com.headius/invokebinder

/**
 * Append to the argument list the given argument values with the specified types.
 *
 * @param types  the actual types to use, rather than getClass
 * @param values the value(s) to append
 * @return a new Binder
 */
public Binder append(Class<?>[] types, Object... values) {
  return new Binder(this, new Insert(type().parameterCount(), types, values));
}
com.headius.invokebinderBindertype

Javadoc

The current MethodType, were the handle chain to terminate at this point.

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

Popular in Java

  • Reading from database using SQL prepared statement
  • scheduleAtFixedRate (ScheduledExecutorService)
  • putExtra (Intent)
  • scheduleAtFixedRate (Timer)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • JButton (javax.swing)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top Vim 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