Home » openjdk-7 » java.lang.invoke » [javadoc | source]
java.lang.invoke
class: MethodHandleNatives [javadoc | source]
java.lang.Object
   java.lang.invoke.MethodHandleNatives
The JVM interface for the method handles package is all here. This is an interface internal and private to an implemetantion of JSR 292. This class is not part of the JSR 292 standard.
Nested Class Summary:
static class  MethodHandleNatives.Constants   
Field Summary
static final  int JVM_PUSH_LIMIT    Java copy of MethodHandlePushLimit in range 2..255. 
static final  int JVM_STACK_MOVE_UNIT    JVM stack motion (in words) after one slot is pushed, usually -1. 
static final  int CONV_OP_IMPLEMENTED_MASK    Which conv-ops are implemented by the JVM? 
static final  boolean HAVE_RICOCHET_FRAMES    Derived mode flag. Only false on some old JVM implementations. 
Method from java.lang.invoke.MethodHandleNatives Summary:
checkSpreadArgument,   expand,   findMethodHandleType,   getBootstrap,   getConstant,   getMembers,   getMethodName,   getTarget,   getTargetInfo,   getTargetMethod,   init,   init,   init,   init,   init,   linkMethodHandleConstant,   makeDynamicCallSite,   makeTarget,   notifyGenericMethodType,   raiseException,   registerBootstrap,   resolve,   setCallSiteTarget,   verifyConstants,   workaroundWithoutRicochetFrames
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from java.lang.invoke.MethodHandleNatives Detail:
 static  void checkSpreadArgument(Object av,
    int n) 
    Called by the JVM to check the length of a spread array.
 static native  void expand(MemberName self)
 static MethodType findMethodHandleType(Class<?> rtype,
    Class<?>[] ptypes) 
    The JVM wants a pointer to a MethodType. Oblige it by finding or creating one.
 static native MethodHandle getBootstrap(Class<?> caller)
    Ask the JVM about a class's bootstrap method.
 static native int getConstant(int which)
    Fetch MH-related JVM parameter. which=0 retrieves MethodHandlePushLimit which=1 retrieves stack slot push size (in address units)
 static native int getMembers(Class<?> defc,
    String matchName,
    String matchSig,
    int matchFlags,
    Class<?> caller,
    int skip,
    MemberName[] results)
 static MemberName getMethodName(MethodHandle self) 
    Fetch the name of the handled method, if available. This routine is for debugging and reflection.
 static native Object getTarget(MethodHandle self,
    int format)
    Fetch the vmtarget field. It will be sanitized as necessary to avoid exposing non-Java references. This routine is for debugging and reflection.
 static Object getTargetInfo(MethodHandle self) 
    Fetch the target of this method handle. If it directly targets a method, return a MemberName for the method. If it is chained to another method handle, return that handle.
 static AccessibleObject getTargetMethod(MethodHandle self) 
    Fetch the reflective version of the handled method, if available.
 static native  void init(MethodType self)
    Initialize a method type, once per form.
 static native  void init(MemberName self,
    Object ref)
 static native  void init(AdapterMethodHandle self,
    MethodHandle target,
    int argnum)
    Initialize the method handle to adapt the call.
 static native  void init(BoundMethodHandle self,
    Object target,
    int argnum)
    Initialize the method handle to call the correct method, directly.
 static native  void init(DirectMethodHandle self,
    Object ref,
    boolean doDispatch,
    Class<?> caller)
    Initialize the method handle to call as if by an invoke* instruction.
 static MethodHandle linkMethodHandleConstant(Class<?> callerClass,
    int refKind,
    Class<?> defc,
    String name,
    Object type) 
    The JVM is resolving a CONSTANT_MethodHandle CP entry. And it wants our help. It will make an up-call to this method. (Do not change the name or signature.)
 static CallSite makeDynamicCallSite(MethodHandle bootstrapMethod,
    String name,
    MethodType type,
    Object info,
    MemberName callerMethod,
    int callerBCI) 
    The JVM is linking an invokedynamic instruction. Create a reified call site for it.
 static Object[] makeTarget(Class<?> defc,
    String name,
    String sig,
    int mods,
    Class<?> refc) 
 static  void notifyGenericMethodType(MethodType type) 
    The JVM wants to use a MethodType with inexact invoke. Give the runtime fair warning.
 static  void raiseException(int code,
    Object actual,
    Object required) 
    The JVM wants to raise an exception. Here's the path.
 static native  void registerBootstrap(Class<?> caller,
    MethodHandle bootstrapMethod)
    Tell the JVM about a class's bootstrap method.
 static native  void resolve(MemberName self,
    Class<?> caller)
 static native  void setCallSiteTarget(CallSite site,
    MethodHandle target)
    Tell the JVM that we need to change the target of an invokedynamic.
 static boolean verifyConstants() 
 static boolean workaroundWithoutRicochetFrames() 
    This assertion marks code which was written before ricochet frames were implemented. Such code will go away when the ports catch up.