Class PyReflectedFunction

java.lang.Object
org.python.core.PyObject
org.python.core.PyReflectedFunction
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
PyReflectedConstructor

public class PyReflectedFunction extends PyObject
See Also:
  • Field Details

    • __name__

      public String __name__
    • __doc__

      public PyObject __doc__
    • argslist

      public org.python.core.ReflectedArgs[] argslist
    • nargs

      public int nargs
  • Constructor Details

    • PyReflectedFunction

      public PyReflectedFunction(String name)
    • PyReflectedFunction

      public PyReflectedFunction(Method method)
  • Method Details

    • _doget

      public PyObject _doget(PyObject container)
      Overrides:
      _doget in class PyObject
    • _doget

      public PyObject _doget(PyObject container, PyObject wherefound)
      Overrides:
      _doget in class PyObject
    • _doset

      public boolean _doset(PyObject container)
    • copy

      public PyReflectedFunction copy()
    • handles

      public boolean handles(Method method)
    • addMethod

      public void addMethod(Method m)
    • __call__

      public PyObject __call__(PyObject self, PyObject[] args, 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, 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 String toString()
      Overrides:
      toString in class PyObject