Class JavaConstant.MethodHandle.Dispatcher.ForJava8CapableVm

    • Constructor Detail

      • ForJava8CapableVm

        protected ForJava8CapableVm​(Method publicLookup,
                                    Method getName,
                                    Method getDeclaringClass,
                                    Method getReferenceKind,
                                    Method getMethodType,
                                    Method returnType,
                                    Method parameterArray,
                                    Method lookupClass,
                                    Method revealDirect)
        Creates a dispatcher for a modern VM.
        Parameters:
        publicLookup - A reference to java.lang.invoke.MethodHandles#publicLookup.
        getName - A reference to java.lang.invoke.MethodHandleInfo#getName.
        getDeclaringClass - A reference to java.lang.invoke.MethodHandleInfo#getDeclaringClass.
        getReferenceKind - A reference to java.lang.invoke.MethodHandleInfo#getReferenceKind.
        getMethodType - A reference to java.lang.invoke.MethodHandleInfo#getMethodType.
        returnType - A reference to java.lang.invoke.MethodType#returnType.
        parameterArray - A reference to java.lang.invoke.MethodType#parameterArray.
        lookupClass - A reference to java.lang.invoke.MethodHandles$Lookup#lookupClass method.
        revealDirect - A reference to the java.lang.invoke.MethodHandles.Lookup#revealDirect method.
    • Method Detail

      • reveal

        public Object reveal​(Object lookup,
                             Object methodHandle)
        Reveals a method handle's information object.
        Parameters:
        lookup - The lookup to be used for introspecting the instance.
        methodHandle - The method handle to be introspected.
        Returns:
        The java.lang.invoke.MethodHandleInfo object that describes the instance.