Class PyReflectedFunction

    • Field Detail

      • __name__

        public java.lang.String __name__
      • __module__

        public PyObject __module__
      • nargs

        public int nargs
    • Constructor Detail

      • PyReflectedFunction

        public PyReflectedFunction​(java.lang.reflect.Method... methods)
    • Method Detail

      • handles

        public boolean handles​(java.lang.reflect.Method method)
      • addMethod

        public void addMethod​(java.lang.reflect.Method m)
      • isPackagedProtected

        public static boolean isPackagedProtected​(java.lang.Class<?> c)
      • __call__

        public PyObject __call__​(PyObject self,
                                 PyObject[] args,
                                 java.lang.String[] keywords)
        Description copied from class: PyObject
        A variant of the __call__ method with one extra initial argument. This variant is used to allow method invocations to be performed efficiently. The default behavior is to invoke __call__(args, keywords) with the appropriate arguments. The only reason to override this function would be for improved performance.
        Overrides:
        __call__ in class PyObject
        Parameters:
        self - the first argument to the function.
        args - the last arguments to the function (including keyword arguments).
        keywords - the keywords used for all keyword arguments.
      • __call__

        public PyObject __call__​(PyObject[] args,
                                 java.lang.String[] keywords)
        Description copied from class: PyObject
        The basic method to override when implementing a callable object. The first len(args)-len(keywords) members of args[] are plain arguments. The last len(keywords) arguments are the values of the keyword arguments.
        Overrides:
        __call__ in class PyObject
        Parameters:
        args - all arguments to the function (including keyword arguments).
        keywords - the keywords used for all keyword arguments.
      • printArgs

        public void printArgs()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class PyObject