|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjnr.ffi.Type
jnr.ffi.StructLayout
public class StructLayout
| Constructor Summary | |
|---|---|
protected |
StructLayout(Runtime runtime)
Creates a new StructLayout. |
protected |
StructLayout(Runtime runtime,
int structSize)
|
| Method Summary | ||
|---|---|---|
protected int |
addField(int size,
int align)
|
|
protected int |
addField(int size,
int align,
StructLayout.Offset offset)
|
|
protected int |
addField(Type t)
|
|
protected int |
addField(Type t,
StructLayout.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 |
|
protected StructLayout.Offset |
at(int offset)
|
|
protected
|
function(Class<T> closureClass)
|
|
protected
|
function(Class<T> closureClass,
StructLayout.Offset offset)
|
|
NativeType |
getNativeType()
The native type of this type |
|
Runtime |
getRuntime()
|
|
protected
|
inner(T structLayout)
|
|
int |
offset()
|
|
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)
protected StructLayout(Runtime runtime,
int structSize)
| Method Detail |
|---|
public final Runtime getRuntime()
public final int size()
Type
size in class Typepublic final int alignment()
Type
alignment in class Typepublic final int offset()
public NativeType getNativeType()
Type
getNativeType in class Typepublic String toString()
String representation of the structure.
toString in class Object
protected final int addField(int size,
int align)
protected final int addField(int size,
int align,
StructLayout.Offset offset)
protected final int addField(Type t)
protected final int addField(Type t,
StructLayout.Offset offset)
protected final StructLayout.Offset at(int 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)
protected final <T> StructLayout.Function<T> function(Class<T> closureClass)
protected final <T> StructLayout.Function<T> function(Class<T> closureClass,
StructLayout.Offset offset)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||