Class JavaConstant.MethodType.Dispatcher.ForJava7CapableVm

    • Constructor Detail

      • ForJava7CapableVm

        protected ForJava7CapableVm​(Method returnType,
                                    Method parameterArray)
        Creates a new dispatcher for a modern JVM.
        Parameters:
        returnType - A reference to java.lang.invoke.MethodType#returnType.
        parameterArray - A reference to java.lang.invoke.MethodType#returnType.
    • Method Detail

      • returnType

        public Class<?> returnType​(Object methodType)
        Extracts the return type of the supplied method type.
        Specified by:
        returnType in interface JavaConstant.MethodType.Dispatcher
        Parameters:
        methodType - An instance of java.lang.invoke.MethodType.
        Returns:
        The return type that is described by the supplied instance.
      • parameterArray

        public Class<?>[] parameterArray​(Object methodType)
        Extracts the parameter types of the supplied method type.
        Specified by:
        parameterArray in interface JavaConstant.MethodType.Dispatcher
        Parameters:
        methodType - An instance of java.lang.invoke.MethodType.
        Returns:
        The parameter types that are described by the supplied instance.