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

public Class StructLayout

extends Custom
implements Traverseproc
Class Inheritance
All Implemented Interfaces
org.python.core.Traverseproc
Annotations
@ExposedType
name:jffi.StructLayout
base:CType
Imports
java.util.Arrays, .Collections, .HashMap, .List, .Map, org.python.core.ArgParser, .Py, .PyList, .PyNewWrapper, .PyObject, .PyType, .Traverseproc, .Visitproc, org.python.expose.ExposedGet, .ExposedMethod, .ExposedNew, .ExposedType

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class
private static class
StructLayout.StructUtil

We enclose any references to the jffi Type class in a lazily-loaded class so the exposed types processor does not crash when jffi can't load the native stub lib.

Field Summary

Modifier and TypeField and Description
private final Map<Object, StructLayout.Field>
private final List<StructLayout.Field>
public static final PyType
Inherited from org.python.modules.jffi.CType.Custom:
jffiType

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public PyObject
__getitem__(PyObject
the key to lookup in this container.
key
)

Overrides org.python.core.PyObject.__getitem__.

Equivalent to the standard Python __getitem__ method.

pack-priv StructLayout.Field
pack-priv StructLayout.Field
pack-priv List<StructLayout.Field>
public boolean
public static PyObject
StructLayout_new(PyNewWrapper new_, boolean init, PyType subtype, PyObject[] args, String[] keywords)

public int
traverse(Visitproc visit, Object arg)

Implements org.python.core.Traverseproc.traverse.

Traverses all directly contained PyObjects.

Inherited from org.python.modules.jffi.CType.Custom:
jffiType

Field Detail

fieldMapback to summary
private final Map<Object, StructLayout.Field> fieldMap
fieldsback to summary
private final List<StructLayout.Field> fields
TYPEback to summary
public static final PyType TYPE

Hides org.python.modules.jffi.CType.TYPE.

Constructor Detail

StructLayoutback to summary
pack-priv StructLayout(StructLayout.Field[] fields, Type struct, MemoryOp op)

Method Detail

__getitem__back to summary
public PyObject __getitem__(PyObject key)

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
key:PyObject

the key to lookup in this container.

Returns:PyObject

the value corresponding to that key.

Annotations
@Override

getFieldback to summary
pack-priv StructLayout.Field getField(PyObject name)
getFieldback to summary
pack-priv StructLayout.Field getField(String name)
getFieldListback to summary
pack-priv List<StructLayout.Field> getFieldList()
refersDirectlyToback to summary
public boolean refersDirectlyTo(PyObject ob)

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
StructLayout_newback to summary
public static PyObject StructLayout_new(PyNewWrapper new_, boolean init, PyType subtype, PyObject[] args, String[] keywords)
Annotations
@ExposedNew
traverseback to summary
public int traverse(Visitproc visit, Object arg)

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 StructLayout.Field

extends PyObject
implements Traverseproc
Class Inheritance
All Implemented Interfaces
org.python.core.Traverseproc
Known Direct Subclasses
org.python.modules.jffi.StructLayout.ScalarField
Annotations
@ExposedType
name:jffi.StructLayout.Field
base:PyObject

Field Summary

Modifier and TypeField and Description
pack-priv final CType
pack-priv final PyObject
pack-priv final int
pack-priv final MemoryOp
public static final PyType
Inherited from org.python.core.PyObject:
attributesgcMonitorGlobalobjtype

Constructor Summary

AccessConstructor and Description
pack-priv
Field(PyObject name, CType ctype, int offset, MemoryOp op)

pack-priv
Field(PyObject name, CType ctype, int offset)

Method Summary

Modifier and TypeMethod and Description
public PyObject
__get__(PyObject
- the instance accessing this descriptor. Can be null if this is being accessed by a type.
obj
,
PyObject
- the type accessing this descriptor. Will be null if obj exists as obj is of the type accessing the descriptor.
type
)

Overrides org.python.core.PyObject.__get__.

Get descriptor for this PyObject.

public void
private static Pointer
public PyObject
public void
pack-priv PyObject
public boolean
pack-priv PyObject
set(PyObject obj, PyObject value)

public int
traverse(Visitproc visit, Object arg)

Implements org.python.core.Traverseproc.traverse.

Traverses all directly contained PyObjects.

Inherited from org.python.core.PyObject:
__abs____add____and____call____call____call____call____call____call____call____call____call____call____call____call____call____call____call____call____cmp____coerce____coerce_ex____complex____contains____delattr____delattr____delete____delitem____delitem____delslice____delslice____dir____div____divmod____ensure_finalizer____eq____findattr____findattr____findattr_ex____finditem____finditem____finditem____float____floordiv____format____ge____getattr____getattr____getitem____getitem____getnewargs____getslice____getslice____gt____hash____hex____iadd____iand____idiv____idivmod____ifloordiv____ilshift____imod____imul____index____int____invert____ior____ipow____irshift____isub____iter____iternext____itruediv____ixor____le____len____long____lshift____lt____mod____mul____ne____neg____nonzero____not____oct____or____pos____pow____pow____radd____rand____rawdir____rdiv____rdivmod____reduce____reduce_ex____reduce_ex____repr____rfloordiv____rlshift____rmod____rmul____ror____rpow____rrshift____rshift____rsub____rtruediv____rxor____setattr____setattr____setitem____setitem____setitem____setslice____setslice____str____sub____tojava____truediv____trunc____unicode____xor___add_and_callextra_cmp_div_divmod_doget_doget_doset_eq_floordiv_ge_gt_iadd_iand_idiv_idivmod_ifloordiv_ilshift_imod_imul_in_ior_ipow_irshift_is_isnot_isub_itruediv_ixor_jcall_jcallexc_jthrow_le_lshift_lt_mod_mul_ne_notin_or_pow_rshift_sub_truediv_unsupportedop_xoradaptToCoerceTupleasDoubleasIndexasIndexasIntasIntasIterableasLongasLongasNameasNameasStringasStringasStringOrNullasStringOrNullbit_lengthconjugatedelDictdelTypedispatch__init__equalsfastGetClassfastGetDictfinalizegetDictgetJavaProxygetTypehashCodeimpAttrimplementsDescrDeleteimplementsDescrGetimplementsDescrSetinvokeinvokeinvokeinvokeinvokeinvokeisCallableisDataDescrisIndexisIntegerisMappingTypeisNumberTypeisSequenceTypemergeClassDictmergeDictAttrmergeListAttrnoAttributeErrorobject___subclasshook__readonlyAttributeErrorrunsupportedopMessagesetDictsetTypetoStringunsupportedopMessage

Field Detail

ctypeback to summary
pack-priv final CType ctype
Annotations
@ExposedGet
nameback to summary
pack-priv final PyObject name
offsetback to summary
pack-priv final int offset
Annotations
@ExposedGet
opback to summary
pack-priv final MemoryOp op
TYPEback to summary
public static final PyType TYPE

Hides org.python.core.PyObject.TYPE.

Constructor Detail

Fieldback to summary
pack-priv Field(PyObject name, CType ctype, int offset, MemoryOp op)
Fieldback to summary
pack-priv Field(PyObject name, CType ctype, int offset)

Method Detail

__get__back to summary
public PyObject __get__(PyObject obj, PyObject type)

Overrides org.python.core.PyObject.__get__.

Doc from org.python.core.PyObject.__get__.

Get descriptor for this PyObject.

Parameters
obj:PyObject

- the instance accessing this descriptor. Can be null if this is being accessed by a type.

type:PyObject

- the type accessing this descriptor. Will be null if obj exists as obj is of the type accessing the descriptor.

Returns:PyObject

- the object defined for this descriptor for the given obj and type.

Annotations
@Override

__set__back to summary
public void __set__(PyObject obj, PyObject value)

Overrides org.python.core.PyObject.__set__.

Annotations
@Override
asPointerback to summary
private static Pointer asPointer(PyObject obj)
Field___get__back to summary
public PyObject Field___get__(PyObject obj, PyObject type)
Annotations
@ExposedMethod
Field___set__back to summary
public void Field___set__(PyObject obj, PyObject value)
Annotations
@ExposedMethod
getback to summary
pack-priv PyObject get(PyObject obj)
Annotations
@ExposedMethod
names:get
refersDirectlyToback to summary
public boolean refersDirectlyTo(PyObject ob)

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
setback to summary
pack-priv PyObject set(PyObject obj, PyObject value)
Annotations
@ExposedMethod
names:set
traverseback to summary
public int traverse(Visitproc visit, Object arg)

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 StructLayout.ScalarField

extends Field
Class Inheritance
Annotations
@ExposedType
name:jffi.StructLayout.ScalarField
base:Field

Field Summary

Modifier and TypeField and Description
public static final PyType
Inherited from org.python.modules.jffi.StructLayout.Field:
ctypenameoffsetop

Constructor Summary

AccessConstructor and Description
public
ScalarField(PyObject name, CType ctype, int offset)

Method Summary

Modifier and TypeMethod and Description
public static PyObject
ScalarField_new(PyNewWrapper new_, boolean init, PyType subtype, PyObject[] args, String[] keywords)

Inherited from org.python.modules.jffi.StructLayout.Field:
__get____set__Field___get__Field___set__getrefersDirectlyTosettraverse

Field Detail

TYPEback to summary
public static final PyType TYPE

Hides org.python.modules.jffi.StructLayout.Field.TYPE.

Constructor Detail

ScalarFieldback to summary
public ScalarField(PyObject name, CType ctype, int offset)

Method Detail

ScalarField_newback to summary
public static PyObject ScalarField_new(PyNewWrapper new_, boolean init, PyType subtype, PyObject[] args, String[] keywords)
Annotations
@ExposedNew
org.python.modules.jffi back to summary

private final Class StructLayout.StructUtil

extends Object
Class Inheritance

We enclose any references to the jffi Type class in a lazily-loaded class so the exposed types processor does not crash when jffi can't load the native stub lib.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static final StructLayout
newStructLayout(StructLayout.Field[] fields, boolean isUnion)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

StructUtilback to summary
private StructUtil()

Method Detail

newStructLayoutback to summary
public static final StructLayout newStructLayout(StructLayout.Field[] fields, boolean isUnion)