Home » openjdk-7 » java.lang.invoke » [javadoc | source]
java.lang.invoke
class: BoundMethodHandle [javadoc | source]
java.lang.Object
   java.lang.invoke.MethodHandle
      java.lang.invoke.BoundMethodHandle
The flavor of method handle which emulates an invoke instruction on a predetermined argument. The JVM dispatches to the correct method when the handle is created, not when it is invoked.
Fields inherited from java.lang.invoke.MethodHandle:
vmtarget,  INT_FIELD,  LONG_FIELD
Constructor:
 BoundMethodHandle(MethodHandle entryPoint) 
    Initialize the current object as a self-bound method handle, binding it as the first argument of the method handle {@code entryPoint}. The invocation type of the resulting method handle will be the same as {@code entryPoint}, except that the first argument type will be dropped.
 BoundMethodHandle(DirectMethodHandle mh,
    Object argument) 
    Bind a direct MH to its receiver (or first ref. argument). The JVM will pre-dispatch the MH if it is not already static.
 BoundMethodHandle(MethodHandle mh,
    Object argument,
    int argnum) 
    Insert an argument into an arbitrary method handle. If argnum is zero, inserts the first argument, etc. The argument type must be a reference.
 BoundMethodHandle(MethodType type,
    Object argument,
    int vmargslot) 
    For the AdapterMethodHandle subclass.
 BoundMethodHandle(MethodType type,
    MethodHandle mh,
    Object argument,
    int argnum) 
    Insert an argument into an arbitrary method handle. If argnum is zero, inserts the first argument, etc.
Method from java.lang.invoke.BoundMethodHandle Summary:
badBoundArgumentException,   baseName,   bindPrimitiveArgument,   checkReferenceArgument,   debugString
Methods from java.lang.invoke.MethodHandle:
asCollector,   asFixedArity,   asSpreader,   asType,   asVarargsCollector,   bindTo,   debugString,   invoke,   invokeExact,   invokeWithArguments,   invokeWithArguments,   isVarargsCollector,   toString,   type
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from java.lang.invoke.BoundMethodHandle Detail:
 static final RuntimeException badBoundArgumentException(Object argument,
    MethodHandle mh,
    int argnum) 
 protected String baseName() 
    Component of toString() before the type string.
 static final Object bindPrimitiveArgument(Object argument,
    MethodHandle mh,
    int argnum) 
    Make sure the given {@code argument} can be used as {@code argnum}-th parameter of the given method handle {@code mh}, which must be a primitive.

    If this fails, throw a suitable {@code WrongMethodTypeException}, which will prevent the creation of an illegally typed bound method handle.

 static final Object checkReferenceArgument(Object argument,
    MethodHandle mh,
    int argnum) 
    Make sure the given {@code argument} can be used as {@code argnum}-th parameter of the given method handle {@code mh}, which must be a reference.

    If this fails, throw a suitable {@code WrongMethodTypeException}, which will prevent the creation of an illegally typed bound method handle.

 String debugString()