Class PyMethodDescr

All Implemented Interfaces:
Serializable, PyBuiltinFunction.Info
Direct Known Subclasses:
PyClassMethodDescr

public class PyMethodDescr extends PyDescriptor implements PyBuiltinFunction.Info
See Also:
  • Constructor Details

  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface PyBuiltinFunction.Info
    • getMaxargs

      public int getMaxargs()
      Specified by:
      getMaxargs in interface PyBuiltinFunction.Info
    • getMinargs

      public int getMinargs()
      Specified by:
      getMinargs in interface PyBuiltinFunction.Info
    • toString

      public String toString()
      Overrides:
      toString in class PyObject
    • __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, String[] kwargs)
      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).
      kwargs - the keywords used for all keyword arguments.
    • unexpectedCall

      public PyException unexpectedCall(int nargs, boolean keywords)
      Specified by:
      unexpectedCall in interface PyBuiltinFunction.Info
    • __get__

      public PyObject __get__(PyObject obj, PyObject type)
      Overrides:
      __get__ in class PyObject