Class PyNewWrapper

    • Field Detail

      • for_type

        public PyType for_type
    • Constructor Detail

      • PyNewWrapper

        public PyNewWrapper()
        Creates a wrapper without binding it to a type. setWrappedType must be called before this wrapper can be used.
      • PyNewWrapper

        public PyNewWrapper​(java.lang.Class c,
                            java.lang.String name,
                            int minargs,
                            int maxargs)
      • PyNewWrapper

        public PyNewWrapper​(PyType type,
                            java.lang.String name,
                            int minargs,
                            int maxargs)
    • Method Detail

      • new_impl

        public abstract PyObject new_impl​(boolean init,
                                          PyType subtype,
                                          PyObject[] args,
                                          java.lang.String[] keywords)
      • getWrappedType

        public PyType getWrappedType()
      • setWrappedType

        public void setWrappedType​(PyType type)
      • __call__

        public PyObject __call__​(PyObject[] args)
        Description copied from class: PyObject
        A variant of the __call__ method when no keywords are passed. 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:
        args - all arguments to the function.
      • __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.