Top Inners Fields Constructors Methods
org.python.modules.jffi

public Class ArrayCData

extends CData
implements Pointer
Class Inheritance
All Implemented Interfaces
org.python.modules.jffi.Pointer
Annotations
@ExposedType
name:jffi.ArrayCData
base:CData
Imports
org.python.core.Py, .PyIterator, .PyList, .PyNewWrapper, .PyObject, .PySequenceList, .PyType, .SequenceIndexDelegate, .Visitproc, org.python.expose.ExposedClassMethod, .ExposedNew, .ExposedType

Nested and Inner Type Summary

Modifier and TypeClass and Description
public class

Field Summary

Modifier and TypeField and Description
pack-priv final CType.Array
pack-priv final MemoryOp
pack-priv final CType
protected final SequenceIndexDelegate
public static final PyType

Constructor Summary

AccessConstructor and Description
pack-priv
ArrayCData(PyType subtype, CType.Array arrayType, DirectMemory memory, MemoryOp componentMemoryOp)

Method Summary

Modifier and TypeMethod and Description
public void
__delitem__(PyObject
the key to be removed from the container
key
)

Overrides org.python.core.PyObject.__delitem__.

Equivalent to the standard Python __delitem__ method.

public PyObject
__finditem__(int
the key to lookup in this sequence.
index
)

Overrides org.python.core.PyObject.__finditem__.

A variant of the __finditem__ method which accepts a primitive int as the key.

public PyObject
__getitem__(PyObject
the key to lookup in this container.
index
)

Overrides org.python.core.PyObject.__getitem__.

Equivalent to the standard Python __getitem__ method.

public PyObject
__iter__()

Overrides org.python.core.PyObject.__iter__.

Return an iterator that is used to iterate the element of this sequence.

public void
__setitem__(int
the key whose value will be set
index
,
PyObject
the value to set this key to
value
)

Overrides org.python.core.PyObject.__setitem__.

A variant of the __setitem__ method which accepts a primitive int as the key.

public void
__setitem__(PyObject
the key whose value will be set
index
,
PyObject
the value to set this key to
value
)

Overrides org.python.core.PyObject.__setitem__.

Equivalent to the standard Python __setitem__ method.

public static PyObject
ArrayCData_new(PyNewWrapper new_, boolean init, PyType subtype, PyObject[] args, String[] keywords)

public static final PyObject
from_address(PyType subtype, PyObject address)

pack-priv static final CType.Array
public final DirectMemory
protected final void
public boolean
public int
traverse(Visitproc visit, Object arg)

Overrides org.python.modules.jffi.CData.traverse.

Implements org.python.core.Traverseproc.traverse.

Traverses all directly contained PyObjects.

Inherited from org.python.modules.jffi.CData:
addressallocateReferenceMemorybyreffindInDllgetContentMemorygetCTypegetMemoryOpgetReferenceMemoryhasReferenceMemorypointersetReferenceMemory

Field Detail

arrayTypeback to summary
pack-priv final CType.Array arrayType
componentMemoryOpback to summary
pack-priv final MemoryOp componentMemoryOp
componentTypeback to summary
pack-priv final CType componentType
delegatorback to summary
protected final SequenceIndexDelegate delegator
TYPEback to summary
public static final PyType TYPE

Hides org.python.modules.jffi.CData.TYPE.

Constructor Detail

ArrayCDataback to summary
pack-priv ArrayCData(PyType subtype, CType.Array arrayType, DirectMemory memory, MemoryOp componentMemoryOp)

Method Detail

__delitem__back to summary
public void __delitem__(PyObject key)

Overrides org.python.core.PyObject.__delitem__.

Doc from org.python.core.PyObject.__delitem__.

Equivalent to the standard Python __delitem__ method.

Parameters
key:PyObject

the key to be removed from the container

Annotations
@Override
__finditem__back to summary
public PyObject __finditem__(int index)

Overrides org.python.core.PyObject.__finditem__.

Doc from org.python.core.PyObject.__finditem__.

A variant of the __finditem__ method which accepts a primitive int as the key. By default, this method will call __finditem__(PyObject key) with the appropriate args. The only reason to override this method is for performance.

Parameters
index:int

the key to lookup in this sequence.

Returns:PyObject

the value corresponding to key or null if key is not found.

Annotations
@Override

__getitem__back to summary
public PyObject __getitem__(PyObject index)

Overrides org.python.core.PyObject.__getitem__.

Doc from org.python.core.PyObject.__getitem__.

Equivalent to the standard Python __getitem__ method. This method should not be overridden. Override the __finditem__ method instead.

Parameters
index:PyObject

the key to lookup in this container.

Returns:PyObject

the value corresponding to that key.

Annotations
@Override

__iter__back to summary
public PyObject __iter__()

Overrides org.python.core.PyObject.__iter__.

Doc from org.python.core.PyObject.__iter__.

Return an iterator that is used to iterate the element of this sequence. From version 2.2, this method is the primary protocol for looping over sequences.

If a PyObject subclass should support iteration based in the __finditem__() method, it must supply an implementation of __iter__() like this:

public PyObject __iter__() {
    return new PySequenceIter(this);
}
When iterating over a python sequence from java code, it should be done with code like this:
for (PyObject item : seq.asIterable()) {
    // Do something with item
}
Annotations
@Override
__setitem__back to summary
public void __setitem__(int index, PyObject value)

Overrides org.python.core.PyObject.__setitem__.

Doc from org.python.core.PyObject.__setitem__.

A variant of the __setitem__ method which accepts a primitive int as the key. By default, this will call __setitem__(PyObject key, PyObject value) with the appropriate args. The only reason to override this method is for performance.

Parameters
index:int

the key whose value will be set

value:PyObject

the value to set this key to

Annotations
@Override
__setitem__back to summary
public void __setitem__(PyObject index, PyObject value)

Overrides org.python.core.PyObject.__setitem__.

Doc from org.python.core.PyObject.__setitem__.

Equivalent to the standard Python __setitem__ method.

Parameters
index:PyObject

the key whose value will be set

value:PyObject

the value to set this key to

Annotations
@Override
ArrayCData_newback to summary
public static PyObject ArrayCData_new(PyNewWrapper new_, boolean init, PyType subtype, PyObject[] args, String[] keywords)
Annotations
@ExposedNew
from_addressback to summary
public static final PyObject from_address(PyType subtype, PyObject address)
Annotations
@ExposedClassMethod
names:from_address
getArrayTypeback to summary
pack-priv static final CType.Array getArrayType(PyType subtype)
getMemoryback to summary
public final DirectMemory getMemory()

Implements org.python.modules.jffi.Pointer.getMemory.

initReferenceMemoryback to summary
protected final void initReferenceMemory(Memory m)

Implements abstract org.python.modules.jffi.CData.initReferenceMemory.

refersDirectlyToback to summary
public boolean refersDirectlyTo(PyObject ob)

Overrides org.python.modules.jffi.CData.refersDirectlyTo.

Implements org.python.core.Traverseproc.refersDirectlyTo.

Doc from org.python.core.Traverseproc.refersDirectlyTo.

Optional operation. Should only be implemented if it is more efficient than calling traverse(Visitproc, Object) with a visitproc that just watches out for ob. Must return false if ob is null.

Annotations
@Override
traverseback to summary
public int traverse(Visitproc visit, Object arg)

Overrides org.python.modules.jffi.CData.traverse.

Implements org.python.core.Traverseproc.traverse.

Doc from org.python.core.Traverseproc.traverse.

Traverses all directly contained PyObjects. Like in CPython, arg must be passed unmodified to visit as its second parameter. If Visitproc#visit(PyObject, Object) returns nonzero, this return value must be returned immediately by traverse. Visitproc#visit(PyObject, Object) must not be called with a null PyObject-argument.

Annotations
@Override
org.python.modules.jffi back to summary

public Class ArrayCData.ArrayIter

extends PyIterator
Class Inheritance

Field Summary

Modifier and TypeField and Description
private int
Inherited from org.python.core.PyIterator:
__doc__nextstopException

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public PyObject
__iternext__()

Implements abstract org.python.core.PyIterator.__iternext__.

Return the next element of the sequence that this is an iterator for.

Inherited from org.python.core.PyIterator:
__iter____tojava__doNextiteratornextrefersDirectlyTotraverse

Field Detail

indexback to summary
private int index

Constructor Detail

ArrayIterback to summary
public ArrayIter()

Method Detail

__iternext__back to summary
public PyObject __iternext__()

Implements abstract org.python.core.PyIterator.__iternext__.

Doc from org.python.core.PyObject.__iternext__.

Return the next element of the sequence that this is an iterator for. Returns null when the end of the sequence is reached.