|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjnr.ffi.StructLayout
public class StructLayout
| Nested Class Summary | |
|---|---|
protected class |
StructLayout.AbstractBoolean
Base class for Boolean fields |
protected class |
StructLayout.AbstractField
Base implementation of Member |
protected class |
StructLayout.Boolean
A normal C boolean - 1 byte in size |
class |
StructLayout.Double
|
protected static interface |
StructLayout.Field
Interface all Struct members must implement. |
class |
StructLayout.Float
|
protected class |
StructLayout.NumberField
Base class for all Number structure fields. |
protected class |
StructLayout.Padding
Specialized padding fields for structs. |
class |
StructLayout.Pointer
Represents a native memory address. |
class |
StructLayout.Signed16
A 16 bit signed integer field. |
class |
StructLayout.Signed32
A 32 bit signed integer field. |
class |
StructLayout.Signed64
A 64 bit signed integer field. |
class |
StructLayout.Signed8
An 8 bit signed integer |
class |
StructLayout.SignedLong
A native long integer field. |
class |
StructLayout.Unsigned16
A 16 bit signed integer field. |
class |
StructLayout.Unsigned32
A 32 bit signed integer field. |
class |
StructLayout.Unsigned64
A 64 bit unsigned integer field. |
class |
StructLayout.Unsigned8
An 8 bit unsigned integer |
class |
StructLayout.UnsignedLong
A native long integer field. |
protected class |
StructLayout.WBOOL
A Windows BOOL - 4 bytes |
| Constructor Summary | |
|---|---|
protected |
StructLayout(Runtime runtime)
Creates a new StructLayout. |
| Method Summary | ||
|---|---|---|
protected int |
addField(int fieldSize,
int fieldAlign)
|
|
protected int |
addField(int fieldSize,
int fieldAlign,
int offset)
|
|
protected int |
addField(int fieldSize,
int fieldAlign,
Struct.Offset offset)
|
|
protected int |
addField(Type t)
|
|
protected int |
addField(Type t,
int offset)
|
|
protected int |
addField(Type t,
Struct.Offset offset)
|
|
int |
alignment()
The native alignment of this type, in bytes |
|
protected
|
array(T[] array)
Creates an array of Member instances. |
|
protected void |
arrayBegin()
Starts an array construction session |
|
protected void |
arrayEnd()
Ends an array construction session |
|
NativeType |
getNativeType()
The native type of this type |
|
Runtime |
getRuntime()
|
|
protected
|
inner(T structLayout)
|
|
int |
size()
The size in bytes of this type. |
|
String |
toString()
Returns a human readable String representation of the structure. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected StructLayout(Runtime runtime)
| Method Detail |
|---|
public final Runtime getRuntime()
public final int size()
Type
size in interface Typepublic final int alignment()
Type
alignment in interface Typepublic NativeType getNativeType()
Type
getNativeType in interface Typepublic String toString()
String representation of the structure.
toString in class Object
protected final int addField(int fieldSize,
int fieldAlign,
int offset)
protected final int addField(int fieldSize,
int fieldAlign,
Struct.Offset offset)
protected final int addField(int fieldSize,
int fieldAlign)
protected final int addField(Type t)
protected final int addField(Type t,
int offset)
protected final int addField(Type t,
Struct.Offset offset)
protected final void arrayBegin()
protected final void arrayEnd()
protected <T extends StructLayout.Field> T[] array(T[] array)
T - The type of the Member subclass to create.array - the array to store the instances in
protected final <T extends StructLayout> T inner(T structLayout)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||