|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.kenai.jaffl.struct.Struct
public abstract class Struct
Representation of C structures in java. Note: This class is not threadsafe.
Nested Class Summary | |
---|---|
class |
Struct.AbstractBoolean
Base class for Boolean fields |
class |
Struct.AbstractMember
Base implementation of Member |
class |
Struct.Address
Represents a native memory address. |
class |
Struct.AsciiString
|
class |
Struct.AsciiStringRef
|
class |
Struct.Boolean
A normal C boolean - 1 byte in size |
protected static class |
Struct.Constants
Various platform-dependent constants needed for Struct construction |
class |
Struct.Double
|
class |
Struct.Enum<T extends java.lang.Enum<T>>
|
class |
Struct.Enum16<E extends java.lang.Enum<E>>
|
class |
Struct.Enum32<E extends java.lang.Enum<E>>
|
class |
Struct.Enum64<E extends java.lang.Enum<E>>
|
class |
Struct.Enum8<E extends java.lang.Enum<E>>
An 8 bit enum field. |
protected class |
Struct.EnumField<E>
Base for all the Enum fields. |
class |
Struct.EnumLong<E extends java.lang.Enum<E>>
|
class |
Struct.Float
|
protected static interface |
Struct.Member
Interface all Struct members must implement. |
protected class |
Struct.NumberField
Base class for all Number structure fields. |
static class |
Struct.Offset
|
class |
Struct.Padding
Specialized padding fields for structs. |
class |
Struct.Pointer
Represents a native memory address. |
class |
Struct.Signed16
A 16 bit signed integer field. |
class |
Struct.Signed32
A 32 bit signed integer field. |
class |
Struct.Signed64
A 64 bit signed integer field. |
class |
Struct.Signed8
An 8 bit signed integer |
class |
Struct.SignedLong
A native long integer field. |
class |
Struct.String
|
class |
Struct.Unsigned16
A 16 bit signed integer field. |
class |
Struct.Unsigned32
A 32 bit signed integer field. |
class |
Struct.Unsigned64
A 64 bit unsigned integer field. |
class |
Struct.Unsigned8
An 8 bit unsigned integer |
class |
Struct.UnsignedLong
A native long integer field. |
class |
Struct.UTF8String
|
class |
Struct.UTF8StringRef
|
class |
Struct.UTFString
|
class |
Struct.UTFStringRef
|
class |
Struct.WBOOL
A Windows BOOL - 4 bytes |
Constructor Summary | |
---|---|
protected |
Struct()
Creates a new Struct. |
Method Summary | ||
---|---|---|
protected Struct.Address[] |
array(Struct.Address[] array)
Creates an array of Address instances. |
|
protected Struct.Double[] |
array(Struct.Double[] array)
Creates an array of Double instances. |
|
protected Struct.Float[] |
array(Struct.Float[] array)
Creates an array of Float instances. |
|
protected Struct.Pointer[] |
array(Struct.Pointer[] array)
Creates an array of Pointer instances. |
|
protected Struct.Signed16[] |
array(Struct.Signed16[] array)
Creates an array of Signed16 instances. |
|
protected Struct.Signed32[] |
array(Struct.Signed32[] array)
Creates an array of Signed32 instances. |
|
protected Struct.Signed64[] |
array(Struct.Signed64[] array)
Creates an array of Signed64 instances. |
|
protected Struct.Signed8[] |
array(Struct.Signed8[] array)
Creates an array of Signed8 instances. |
|
protected Struct.SignedLong[] |
array(Struct.SignedLong[] array)
Creates an array of SignedLong instances. |
|
protected Struct.Unsigned16[] |
array(Struct.Unsigned16[] array)
Creates an array of Unsigned16 instances. |
|
protected Struct.Unsigned32[] |
array(Struct.Unsigned32[] array)
Creates an array of Unsigned32 instances. |
|
protected Struct.Unsigned64[] |
array(Struct.Unsigned64[] array)
Creates an array of Unsigned64 instances. |
|
protected Struct.Unsigned8[] |
array(Struct.Unsigned8[] array)
Creates an array of Unsigned8 instances. |
|
protected Struct.UnsignedLong[] |
array(Struct.UnsignedLong[] array)
Creates an array of UnsignedLong instances. |
|
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
|
inner(Struct struct)
|
|
java.lang.String |
toString()
Returns a human readable String representation of the structure. |
|
void |
useMemory(MemoryIO address)
Uses the specified memory address as the backing store for this structure. |
|
void |
useMemory(Pointer address)
Uses the specified memory address as the backing store for this structure. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected Struct()
Method Detail |
---|
public void useMemory(MemoryIO address)
address
- the native memory area.public void useMemory(Pointer address)
address
- the native memory area.public java.lang.String toString()
String
representation of the structure.
toString
in class java.lang.Object
protected final void arrayBegin()
protected final void arrayEnd()
protected <T extends Struct.Member> T[] array(T[] array)
T
- The type of the Member subclass to create.array
- the array to store the instances in
protected final Struct.Signed8[] array(Struct.Signed8[] array)
array
- the array to store the instances in
protected final Struct.Unsigned8[] array(Struct.Unsigned8[] array)
array
- the array to store the instances in
protected final Struct.Signed16[] array(Struct.Signed16[] array)
array
- the array to store the instances in
protected final Struct.Unsigned16[] array(Struct.Unsigned16[] array)
array
- the array to store the instances in
protected final Struct.Signed32[] array(Struct.Signed32[] array)
array
- the array to store the instances in
protected final Struct.Unsigned32[] array(Struct.Unsigned32[] array)
array
- the array to store the instances in
protected final Struct.Signed64[] array(Struct.Signed64[] array)
array
- the array to store the instances in
protected final Struct.Unsigned64[] array(Struct.Unsigned64[] array)
array
- the array to store the instances in
protected final Struct.SignedLong[] array(Struct.SignedLong[] array)
array
- the array to store the instances in
protected final Struct.UnsignedLong[] array(Struct.UnsignedLong[] array)
array
- the array to store the instances in
protected final Struct.Float[] array(Struct.Float[] array)
array
- the array to store the instances in
protected final Struct.Double[] array(Struct.Double[] array)
array
- the array to store the instances in
protected final Struct.Address[] array(Struct.Address[] array)
array
- the array to store the instances in
protected final Struct.Pointer[] array(Struct.Pointer[] array)
array
- the array to store the instances in
protected final <T extends Struct> T inner(Struct struct)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |