Top Description Inners Fields Constructors Methods
org.python.core

public abstract Class PyJavaFunction

extends Object
implements CraftedPyObject, FastCall
Class Inheritance
All Implemented Interfaces
org.python.core.FastCall, org.python.core.CraftedPyObject
Known Direct Subclasses
org.python.core.PyJavaFunction.General, org.python.core.PyJavaFunction.AbstractPositional
Imports
java.lang.invoke.MethodHandle, .MethodHandles, java.util.List, org.python.base.InterpreterError, .MethodKind, org.python.core.ArgumentError.Mode, .Exposed.Getter, .Exposed.Member

The Python builtin_function_or_method object. Java sub-classes represent either a built-in function or a built-in method bound to a particular object.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private abstract static class
PyJavaFunction.AbstractPositional

Base class for methods that accept between defined maximum and minimum numbers of arguments, that must be given by position.

private static class
PyJavaFunction.General

The implementation may have any signature allowed by ArgParser.

private static class
PyJavaFunction.NoArgs

The implementation signature accepts no arguments.

private static class
PyJavaFunction.O1

The implementation signature requires one argument, which may be supplied by ArgParser#getDefaults().

private static class
PyJavaFunction.O2

The implementation signature requires two arguments, which may be supplied by ArgParser#getDefaults().

private static class
PyJavaFunction.O3

The implementation signature requires three arguments, which may be supplied by ArgParser#getDefaults().

private static class
PyJavaFunction.Positional

A method represented by Positional only accepts arguments given by position.

Field Summary

Modifier and TypeField and Description
pack-priv final ArgParser
argParser

An argument parser supplied to this PyJavaFunction at construction, from Java reflection of the definition in Java and from annotations on it.

pack-priv final MethodHandle
handle

A Java MethodHandle that implements the function or bound method.

pack-priv final String
module

Name of the containing module (or null).

pack-priv final Object
self

The object to which this is bound as target (or null).

pack-priv static final PyType
TYPE

The type of Python object this class implements.

Constructor Summary

AccessConstructor and Description
protected
PyJavaFunction(ArgParser
parser defining the method
argParser
,
MethodHandle
a prepared prepared to the method defined
handle
,
Object
object to which bound (or null if a static method)
self
,
String
name of the module supplying the definition
module
)

Construct a Python builtin_function_or_method object, optionally bound to a particular "self" object, specifying the prepared method handle.

Method Summary

Modifier and TypeMethod and Description
pack-priv Object
__call__(Object[] args, String[] names)

pack-priv String

Returns:

name of the function or method
__name__
()

protected Object
pack-priv static PyJavaFunction

Returns:

a Java method object supporting the signature
from
(PyMethodDescr
descriptor being bound
descr
,
Object
object to which bound (or null if a static method)
self
)

Construct a PyJavaFunction from a PyMethodDescr and optional object to bind.

pack-priv static PyJavaFunction

Returns:

A method descriptor supporting the signature
fromParser
(ArgParser
argument parser (provides name etc.)
ap
,
MethodHandle
raw handle to the method defined
method
,
Object
object to which bound (or null if a static method)
self
,
String
name of the module supplying the definition (or null if representing a bound method of a type)
module
)

Construct a PyJavaFunction from an ArgParser and MethodHandle for the implementation method.

public PyType
getType()

Implements org.python.core.CraftedPyObject.getType.

The Python type of this object.
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public TypeError

Returns:

a TypeError to throw
typeError
(ArgumentError
expressing the problem
ae
,
Object[]
positional arguments (only the number will matter)
args
,
String[]
of keyword arguments or null
names
)

Implements org.python.core.FastCall.typeError.

Translate a problem with the number and pattern of arguments, in a failed attempt to call the wrapped method, to a Python TypeError.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

argParserback to summary
pack-priv final ArgParser argParser

An argument parser supplied to this PyJavaFunction at construction, from Java reflection of the definition in Java and from annotations on it. Full information on the signature is available from this structure, and it is available to parse the arguments to __call__(Object[], String[]).

handleback to summary
pack-priv final MethodHandle handle

A Java MethodHandle that implements the function or bound method. The type of this handle varies according to the sub-class of PyJavaFunction, but it is definitely "prepared" to accept Object.class instances or arrays, not the actual parameter types of the method definition in Java.

moduleback to summary
pack-priv final String module

Name of the containing module (or null).

selfback to summary
pack-priv final Object self

The object to which this is bound as target (or null). Conventions (adopted from CPython) around this field are that it should be null when representing a static method of a built-in class, and otherwise contain the bound target (object or type). A function obtained from a module may be a method bound to an instance of that module.

Annotations
@Member:__self__

TYPEback to summary
pack-priv static final PyType TYPE

The type of Python object this class implements.

Constructor Detail

PyJavaFunctionback to summary
protected PyJavaFunction(ArgParser argParser, MethodHandle handle, Object self, String module)

Construct a Python builtin_function_or_method object, optionally bound to a particular "self" object, specifying the prepared method handle. The self object to which this is bound should be null if the method is Python static in a type. Otherwise, we will create a method bound to self as target. This may be any object in the case of an instance method, is a type in the case of a class method, and is a module in the case of a function in a module (whether the Java signature is Java static or not).

Parameters
argParser:ArgParser

parser defining the method

handle:MethodHandle

a prepared prepared to the method defined

self:Object

object to which bound (or null if a static method)

module:String

name of the module supplying the definition

Method Detail

__call__back to summary
pack-priv Object __call__(Object[] args, String[] names) throws TypeError, Throwable
__name__back to summary
pack-priv String __name__()
Returns:String

name of the function or method

Annotations
@Getter

__repr__back to summary
protected Object __repr__() throws Throwable
fromback to summary
pack-priv static PyJavaFunction from(PyMethodDescr descr, Object self) throws TypeError, Throwable

Construct a PyJavaFunction from a PyMethodDescr and optional object to bind. The PyMethodDescr provides the parser and unbound prepared MethodHandle. The arguments described by the parser do not include "self". This is the factory that supports descriptor __get__.

Parameters
descr:PyMethodDescr

descriptor being bound

self:Object

object to which bound (or null if a static method)

Returns:PyJavaFunction

a Java method object supporting the signature

Exceptions
TypeError:
if self is not compatible with descr
Throwable:
on other errors while chasing the MRO

fromParserback to summary
pack-priv static PyJavaFunction fromParser(ArgParser ap, MethodHandle method, Object self, String module)

Construct a PyJavaFunction from an ArgParser and MethodHandle for the implementation method. The arguments described by the parser do not include "self". This is the factory we use to create a function in a module.

Parameters
ap:ArgParser

argument parser (provides name etc.)

method:MethodHandle

raw handle to the method defined

self:Object

object to which bound (or null if a static method)

module:String

name of the module supplying the definition (or null if representing a bound method of a type)

Returns:PyJavaFunction

A method descriptor supporting the signature

getTypeback to summary
public PyType getType()

Implements org.python.core.CraftedPyObject.getType.

Doc from org.python.core.CraftedPyObject.getType.

The Python type of this object.

Returns:PyType

type of this object

Annotations
@Override

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override

typeErrorback to summary
public TypeError typeError(ArgumentError ae, Object[] args, String[] names)

Implements org.python.core.FastCall.typeError.

Translate a problem with the number and pattern of arguments, in a failed attempt to call the wrapped method, to a Python TypeError.

Parameters
ae:ArgumentError

expressing the problem

args:Object[]

positional arguments (only the number will matter)

names:String[]

Doc from org.python.core.FastCall.typeError.

of keyword arguments or null

Returns:TypeError

a TypeError to throw

Annotations
@Override
@SuppressWarnings:fallthrough

org.python.core back to summary

private abstract Class PyJavaFunction.AbstractPositional

extends PyJavaFunction
Class Inheritance
Known Direct Subclasses
org.python.core.PyJavaFunction.NoArgs, org.python.core.PyJavaFunction.O1, org.python.core.PyJavaFunction.O2, org.python.core.PyJavaFunction.O3, org.python.core.PyJavaFunction.Positional

Base class for methods that accept between defined maximum and minimum numbers of arguments, that must be given by position. Maximum and minimum may be equal to a single acceptable number.

Arguments may not be given by keyword. There is no excess argument (varargs) collector.

The number of arguments required by the wrapped Java method sets a maximum allowable number of arguments. Fewer arguments than this may be given, to the extent that defaults specified by the parser make up the difference. The number of available defaults determines the minimum number of arguments to be supplied.

Implementation Note

Sub-classes must define call(Object[]): the default definition in FastCall is not enough.

Field Summary

Modifier and TypeField and Description
protected final Object[]
d

Default values of the trailing arguments.

protected final int
max

Maximum number of positional arguments in a call.

protected final int
min

Minimum number of positional arguments in a call.

Inherited from org.python.core.PyJavaFunction:
argParserhandlemoduleselfTYPE

Constructor Summary

AccessConstructor and Description
pack-priv
AbstractPositional(ArgParser argParser, MethodHandle handle, Object self, String module)

Construct a method descriptor, identifying the implementation by a parser and a method handle.

Method Summary

Modifier and TypeMethod and Description
pack-priv Object
public Object
call(Object[]
all arguments given, positional then keyword
args
,
String[]
of keyword arguments or null
names
)

Implements org.python.core.FastCall.call.

Invoke the target object with standard arguments (Object[] and String[]), providing all the argument values from the caller and names for those given by keyword.
public Object
call(Object[]
arguments given by position
args
)

Overrides default org.python.core.FastCall.call.

Call the object with arguments given by position only.
Inherited from org.python.core.PyJavaFunction:
__name____repr__fromfromParsergetTypetoStringtypeError

Field Detail

dback to summary
protected final Object[] d

Default values of the trailing arguments.

maxback to summary
protected final int max

Maximum number of positional arguments in a call.

minback to summary
protected final int min

Minimum number of positional arguments in a call.

Constructor Detail

AbstractPositionalback to summary
pack-priv AbstractPositional(ArgParser argParser, MethodHandle handle, Object self, String module)

Construct a method descriptor, identifying the implementation by a parser and a method handle.

Method Detail

__call__back to summary
pack-priv Object __call__(Object[] args, String[] names) throws TypeError, Throwable

Overrides org.python.core.PyJavaFunction.__call__.

Annotations
@Override
callback to summary
public Object call(Object[] args, String[] names) throws TypeError, Throwable

Implements org.python.core.FastCall.call.

Doc from org.python.core.FastCall.call.

Invoke the target object with standard arguments (Object[] and String[]), providing all the argument values from the caller and names for those given by keyword. If no other methods are implemented, a call to any other interface method will land here with an array of the arguments.This is to provide implementations of __call__ with a default when no more optimal call is possible.

np = args.length - names.length arguments are given by position, and the keyword arguments are {names[i]:args[np+i]}.

Parameters
args:Object[]

all arguments given, positional then keyword

names:String[]

of keyword arguments or null

Returns:Object

result of the invocation

Annotations
@Override
Exceptions
Throwable:
from the implementation

callback to summary
public Object call(Object[] args) throws TypeError, Throwable

Overrides default org.python.core.FastCall.call.

Doc from org.python.core.FastCall.call.

Call the object with arguments given by position only.

Parameters
args:Object[]

arguments given by position

Returns:Object

result of the invocation

Annotations
@Override
Exceptions
Throwable:
from the implementation

org.python.core back to summary

private Class PyJavaFunction.General

extends PyJavaFunction
Class Inheritance

The implementation may have any signature allowed by ArgParser.

Field Summary

Inherited from org.python.core.PyJavaFunction:
argParserhandlemoduleselfTYPE

Constructor Summary

AccessConstructor and Description
pack-priv
General(ArgParser
describing the signature of the method
argParser
,
MethodHandle
a prepared prepared to the method defined
handle
,
Object
object to which bound (or null if a static method)
self
,
String
name of the module supplying the definition (or null if representing a bound method of a type)
module
)

Construct a method object, identifying the implementation by a parser and a method handle.

Method Summary

Modifier and TypeMethod and Description
public Object
call(Object[]
all arguments given, positional then keyword
args
,
String[]
of keyword arguments or null
names
)

Implements org.python.core.FastCall.call.

Invoke the target object with standard arguments (Object[] and String[]), providing all the argument values from the caller and names for those given by keyword.
Inherited from org.python.core.PyJavaFunction:
__call____name____repr__fromfromParsergetTypetoStringtypeError

Constructor Detail

Generalback to summary
pack-priv General(ArgParser argParser, MethodHandle handle, Object self, String module)

Construct a method object, identifying the implementation by a parser and a method handle.

Parameters
argParser:ArgParser

describing the signature of the method

handle:MethodHandle

a prepared prepared to the method defined

self:Object

object to which bound (or null if a static method)

module:String

name of the module supplying the definition (or null if representing a bound method of a type)

Method Detail

callback to summary
public Object call(Object[] args, String[] names) throws TypeError, Throwable

Implements org.python.core.FastCall.call.

Doc from org.python.core.FastCall.call.

Invoke the target object with standard arguments (Object[] and String[]), providing all the argument values from the caller and names for those given by keyword. If no other methods are implemented, a call to any other interface method will land here with an array of the arguments.This is to provide implementations of __call__ with a default when no more optimal call is possible.

np = args.length - names.length arguments are given by position, and the keyword arguments are {names[i]:args[np+i]}.

Parameters
args:Object[]

all arguments given, positional then keyword

names:String[]

of keyword arguments or null

Returns:Object

result of the invocation

Annotations
@Override
Exceptions
Throwable:
from the implementation

org.python.core back to summary

private Class PyJavaFunction.NoArgs

extends AbstractPositional
Class Inheritance

The implementation signature accepts no arguments.

Field Summary

Inherited from org.python.core.PyJavaFunction.AbstractPositional:
dmaxmin

Constructor Summary

AccessConstructor and Description
pack-priv
NoArgs(ArgParser
describing the signature of the method
argParser
,
MethodHandle
a prepared prepared to the method defined
handle
,
Object
object to which bound (or null if a static method)
self
,
String
name of the module supplying the definition (or null if representing a bound method of a type)
module
)

Construct a method object, identifying the implementation by a parser and a prepared method handle.

Method Summary

Modifier and TypeMethod and Description
public Object
call(Object[]
arguments given by position
a
)

Overrides org.python.core.PyJavaFunction.AbstractPositional.call.

Overrides default org.python.core.FastCall.call.

Call the object with arguments given by position only.
Inherited from org.python.core.PyJavaFunction.AbstractPositional:
__call__call

Constructor Detail

NoArgsback to summary
pack-priv NoArgs(ArgParser argParser, MethodHandle handle, Object self, String module)

Construct a method object, identifying the implementation by a parser and a prepared method handle.

Parameters
argParser:ArgParser

describing the signature of the method

handle:MethodHandle

a prepared prepared to the method defined

self:Object

object to which bound (or null if a static method)

module:String

name of the module supplying the definition (or null if representing a bound method of a type)

Method Detail

callback to summary
public Object call(Object[] a) throws Throwable

Overrides org.python.core.PyJavaFunction.AbstractPositional.call.

Overrides default org.python.core.FastCall.call.

Doc from org.python.core.FastCall.call.

Call the object with arguments given by position only.

Parameters
a:Object[]

arguments given by position

Returns:Object

result of the invocation

Annotations
@Override
Exceptions
Throwable:
from the implementation

org.python.core back to summary

private Class PyJavaFunction.O1

extends AbstractPositional
Class Inheritance

The implementation signature requires one argument, which may be supplied by ArgParser#getDefaults().

Field Summary

Inherited from org.python.core.PyJavaFunction.AbstractPositional:
dmaxmin

Constructor Summary

AccessConstructor and Description
pack-priv
O1(ArgParser
describing the signature of the method
argParser
,
MethodHandle
a prepared prepared to the method defined
handle
,
Object
object to which bound (or null if a static method)
self
,
String
name of the module supplying the definition (or null if representing a bound method of a type)
module
)

Construct a method object, identifying the implementation by a parser and a method handle.

Method Summary

Modifier and TypeMethod and Description
public Object
call(Object[]
arguments given by position
a
)

Overrides org.python.core.PyJavaFunction.AbstractPositional.call.

Overrides default org.python.core.FastCall.call.

Call the object with arguments given by position only.
Inherited from org.python.core.PyJavaFunction.AbstractPositional:
__call__call

Constructor Detail

O1back to summary
pack-priv O1(ArgParser argParser, MethodHandle handle, Object self, String module)

Construct a method object, identifying the implementation by a parser and a method handle.

Parameters
argParser:ArgParser

describing the signature of the method

handle:MethodHandle

a prepared prepared to the method defined

self:Object

object to which bound (or null if a static method)

module:String

name of the module supplying the definition (or null if representing a bound method of a type)

Method Detail

callback to summary
public Object call(Object[] a) throws TypeError, Throwable

Overrides org.python.core.PyJavaFunction.AbstractPositional.call.

Overrides default org.python.core.FastCall.call.

Doc from org.python.core.FastCall.call.

Call the object with arguments given by position only.

Parameters
a:Object[]

arguments given by position

Returns:Object

result of the invocation

Annotations
@Override
Exceptions
Throwable:
from the implementation

org.python.core back to summary

private Class PyJavaFunction.O2

extends AbstractPositional
Class Inheritance

The implementation signature requires two arguments, which may be supplied by ArgParser#getDefaults().

Field Summary

Inherited from org.python.core.PyJavaFunction.AbstractPositional:
dmaxmin

Constructor Summary

AccessConstructor and Description
pack-priv
O2(ArgParser
describing the signature of the method
argParser
,
MethodHandle handle, Object self, String module)

Construct a method descriptor, identifying the implementation by a parser and a method handle.

Method Summary

Modifier and TypeMethod and Description
public Object
call(Object[]
arguments given by position
a
)

Overrides org.python.core.PyJavaFunction.AbstractPositional.call.

Overrides default org.python.core.FastCall.call.

Call the object with arguments given by position only.
public Object
call()

Overrides default org.python.core.FastCall.call.

Call the object with arguments given by position only.
public Object
call(Object
single argument (may be self)
a0
)

Overrides default org.python.core.FastCall.call.

Call the object with arguments given by position only.
public Object
call(Object
zeroth argument (may be self)
self
,
Object
next argument
a0
,
Object
next argument
a1
)

Overrides default org.python.core.FastCall.call.

Call the object with arguments given by position only.
Inherited from org.python.core.PyJavaFunction.AbstractPositional:
__call__call

Constructor Detail

O2back to summary
pack-priv O2(ArgParser argParser, MethodHandle handle, Object self, String module)

Construct a method descriptor, identifying the implementation by a parser and a method handle.

Parameters
argParser:ArgParser

describing the signature of the method

Method Detail

callback to summary
public Object call(Object[] a) throws ArgumentError, TypeError, Throwable

Overrides org.python.core.PyJavaFunction.AbstractPositional.call.

Overrides default org.python.core.FastCall.call.

Doc from org.python.core.FastCall.call.

Call the object with arguments given by position only.

Parameters
a:Object[]

arguments given by position

Returns:Object

result of the invocation

Annotations
@Override
Exceptions
ArgumentError:
if the wrong number of arguments is given.
Throwable:
from the implementation

callback to summary
public Object call() throws Throwable

Overrides default org.python.core.FastCall.call.

Doc from org.python.core.FastCall.call.

Call the object with arguments given by position only.

Returns:Object

result of the invocation

Annotations
@Override
Exceptions
Throwable:
from the implementation

callback to summary
public Object call(Object a0) throws Throwable

Overrides default org.python.core.FastCall.call.

Doc from org.python.core.FastCall.call.

Call the object with arguments given by position only.

Parameters
a0:Object

single argument (may be self)

Returns:Object

result of the invocation

Annotations
@Override
Exceptions
Throwable:
from the implementation

callback to summary
public Object call(Object self, Object a0, Object a1) throws Throwable

Overrides default org.python.core.FastCall.call.

Doc from org.python.core.FastCall.call.

Call the object with arguments given by position only.

Parameters
self:Object

zeroth argument (may be self)

a0:Object

next argument

a1:Object

next argument

Returns:Object

result of the invocation

Annotations
@Override
Exceptions
Throwable:
from the implementation

org.python.core back to summary

private Class PyJavaFunction.O3

extends AbstractPositional
Class Inheritance

The implementation signature requires three arguments, which may be supplied by ArgParser#getDefaults().

Field Summary

Inherited from org.python.core.PyJavaFunction.AbstractPositional:
dmaxmin

Constructor Summary

AccessConstructor and Description
pack-priv
O3(ArgParser
describing the signature of the method
argParser
,
MethodHandle handle, Object self, String module)

Construct a method descriptor, identifying the implementation by a parser and a method handle.

Method Summary

Modifier and TypeMethod and Description
public Object
call(Object[]
arguments given by position
a
)

Overrides org.python.core.PyJavaFunction.AbstractPositional.call.

Overrides default org.python.core.FastCall.call.

Call the object with arguments given by position only.
public Object
call()

Overrides default org.python.core.FastCall.call.

Call the object with arguments given by position only.
public Object
call(Object
single argument (may be self)
a0
)

Overrides default org.python.core.FastCall.call.

Call the object with arguments given by position only.
public Object
call(Object
zeroth argument (may be self)
a0
,
Object
next argument
a1
)

Overrides default org.python.core.FastCall.call.

Call the object with arguments given by position only.
public Object
call(Object
zeroth argument (may be self)
a0
,
Object
next argument
a1
,
Object
next argument
a2
)

Overrides default org.python.core.FastCall.call.

Call the object with arguments given by position only.
Inherited from org.python.core.PyJavaFunction.AbstractPositional:
__call__call

Constructor Detail

O3back to summary
pack-priv O3(ArgParser argParser, MethodHandle handle, Object self, String module)

Construct a method descriptor, identifying the implementation by a parser and a method handle.

Parameters
argParser:ArgParser

describing the signature of the method

Method Detail

callback to summary
public Object call(Object[] a) throws ArgumentError, TypeError, Throwable

Overrides org.python.core.PyJavaFunction.AbstractPositional.call.

Overrides default org.python.core.FastCall.call.

Doc from org.python.core.FastCall.call.

Call the object with arguments given by position only.

Parameters
a:Object[]

arguments given by position

Returns:Object

result of the invocation

Annotations
@Override
Exceptions
ArgumentError:
if the wrong number of arguments is given.
Throwable:
from the implementation

callback to summary
public Object call() throws Throwable

Overrides default org.python.core.FastCall.call.

Doc from org.python.core.FastCall.call.

Call the object with arguments given by position only.

Returns:Object

result of the invocation

Annotations
@Override
Exceptions
Throwable:
from the implementation

callback to summary
public Object call(Object a0) throws Throwable

Overrides default org.python.core.FastCall.call.

Doc from org.python.core.FastCall.call.

Call the object with arguments given by position only.

Parameters
a0:Object

single argument (may be self)

Returns:Object

result of the invocation

Annotations
@Override
Exceptions
Throwable:
from the implementation

callback to summary
public Object call(Object a0, Object a1) throws Throwable

Overrides default org.python.core.FastCall.call.

Doc from org.python.core.FastCall.call.

Call the object with arguments given by position only.

Parameters
a0:Object

zeroth argument (may be self)

a1:Object

next argument

Returns:Object

result of the invocation

Annotations
@Override
Exceptions
Throwable:
from the implementation

callback to summary
public Object call(Object a0, Object a1, Object a2) throws Throwable

Overrides default org.python.core.FastCall.call.

Doc from org.python.core.FastCall.call.

Call the object with arguments given by position only.

Parameters
a0:Object

zeroth argument (may be self)

a1:Object

next argument

a2:Object

next argument

Returns:Object

result of the invocation

Annotations
@Override
Exceptions
Throwable:
from the implementation

org.python.core back to summary

private Class PyJavaFunction.Positional

extends AbstractPositional
Class Inheritance

A method represented by Positional only accepts arguments given by position. The constraints detailed for AbstractPositional apply.

fromParser() will only choose a Positional (or sub-class) representation of the method when these conditions apply.

Field Summary

Inherited from org.python.core.PyJavaFunction.AbstractPositional:
dmaxmin

Constructor Summary

AccessConstructor and Description
pack-priv
Positional(ArgParser
describing the signature of the method
argParser
,
MethodHandle
a prepared prepared to the method defined
handle
,
Object
object to which bound (or null if a static method)
self
,
String
name of the module supplying the definition (or null if representing a bound method of a type)
module
)

Construct a method object, identifying the implementation by a parser and a method handle.

Method Summary

Modifier and TypeMethod and Description
public Object
call(Object[]
arguments given by position
args
)

Overrides org.python.core.PyJavaFunction.AbstractPositional.call.

Overrides default org.python.core.FastCall.call.

Call the object with arguments given by position only.
Inherited from org.python.core.PyJavaFunction.AbstractPositional:
__call__call

Constructor Detail

Positionalback to summary
pack-priv Positional(ArgParser argParser, MethodHandle handle, Object self, String module)

Construct a method object, identifying the implementation by a parser and a method handle.

Parameters
argParser:ArgParser

describing the signature of the method

handle:MethodHandle

a prepared prepared to the method defined

self:Object

object to which bound (or null if a static method)

module:String

name of the module supplying the definition (or null if representing a bound method of a type)

Method Detail

callback to summary
public Object call(Object[] args) throws TypeError, Throwable

Overrides org.python.core.PyJavaFunction.AbstractPositional.call.

Overrides default org.python.core.FastCall.call.

Doc from org.python.core.FastCall.call.

Call the object with arguments given by position only.

Parameters
args:Object[]

arguments given by position

Returns:Object

result of the invocation

Annotations
@Override
Exceptions
Throwable:
from the implementation