Top Description Fields Constructors Methods
org.python.base

public final Enum MethodKind

extends Enum<MethodKind>
Class Inheritance

Enum describing whether a method is an instance, static or class method (in Python).

Field Summary

Modifier and TypeField and Description
public static final MethodKind
CLASS

The first argument is the Python type of the target.

public static final MethodKind
INSTANCE

The first argument is self or a module.

public static final MethodKind
STATIC

The method must be defined by a Java static method.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static MethodKind
public static MethodKind[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

CLASSback to summary
public static final MethodKind CLASS

The first argument is the Python type of the target. The method must be defined either by a Java static method in which an initial type argument is declared. In a call from Python that uses dot notation, which is attribute lookup, the target object's type is used to find the method, and is bound to the first parameter.

INSTANCEback to summary
public static final MethodKind INSTANCE

The first argument is self or a module. The method must be defined either by a Java instance method or by a static method in which an initial self or module argument is declared. In a call from Python that uses dot notation, which is attribute lookup, the target object (or module) is used to find the method, and is bound to the first parameter.

STATICback to summary
public static final MethodKind STATIC

The method must be defined by a Java static method. An initial self or module argument is not expected. (If the writer attempts to declare one it will simply be the first parameter.) In a call from Python that uses dot notation, which is attribute lookup, the target object (or its type) is used to find the method, but is not bound to the first parameter.

Constructor Detail

MethodKindback to summary
private MethodKind()

Method Detail

valueOfback to summary
public static MethodKind valueOf(String name)
valuesback to summary
public static MethodKind[] values()