public class StructInfo
extends java.lang.Object
Constructor and Description |
---|
StructInfo(Endian endianess,
Alignment alignment,
boolean endpad,
java.util.List<FieldInfo> fields,
java.lang.Class<?> clz)
Create instance of StructInfo.
|
Modifier and Type | Method and Description |
---|---|
static StructInfo |
analyze(java.lang.Class<?> clz)
Analyze class.
|
Alignment |
getAlignment()
Get Alignment.
|
Endian |
getEndianess()
Get endianess.
|
boolean |
getEndpad()
Get pad at end.
|
java.util.List<FieldInfo> |
getFields()
Get fields.
|
int |
getLength()
Get length of fixed length parts of struct.
|
int |
getOffset(java.lang.String fldnam)
Get offset for field name.
|
int |
getSelectorField()
Get index of selector field.
|
boolean |
isFixedLength()
Is this a fixed length struct.
|
public StructInfo(Endian endianess, Alignment alignment, boolean endpad, java.util.List<FieldInfo> fields, java.lang.Class<?> clz) throws RecordException
endianess
- byte order for all fieldsalignment
- alignment for all fieldsendpad
- pad at endfields
- array of FieldInfo describing all fieldsclz
- class implementing structRecordException
- if error calculating length informationpublic Endian getEndianess()
public Alignment getAlignment()
public boolean getEndpad()
public boolean isFixedLength()
public java.util.List<FieldInfo> getFields()
public int getLength()
public int getSelectorField()
public int getOffset(java.lang.String fldnam) throws RecordException
fldnam
- field nameRecordException
- if error calculating length informationpublic static StructInfo analyze(java.lang.Class<?> clz) throws RecordException
clz
- class to analyzeRecordException
- if error calculation length information