Package com.igormaznitsa.jbbp.mapper
Annotation Interface Bin
The annotation describes a field in a class which can be mapped and loaded
from parsed a JBBP structure, also it can be used for whole class but in the
case be careful and use default name and path values. The Class is not thread safe.
Since 2.0.0 was removed prefix 'out' for fields which contained it.
- Since:
- 1.0
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionExpression to represent array size of the field.The Value defines how many bytes are actual ones in the field, works for numeric field and arrays and allows make mapping to bit fields.Order of bits for the field.Byte order to be used for operations.Just either description of the field or some remark.booleanThe Flag shows that the field must be processed by a defined externally custom field processors during loading and saving.Custom type.Name of a structure element to be mapped to the field.intThe Value defines the field order to show relative position in data stream.Expression as extra part of type.Structure path inside to be mapped to the field.Type of mapped parsed structure element.
-
Element Details
-
name
String nameName of a structure element to be mapped to the field.- Returns:
- string name, if it is empty then field name will be used as name
- Default:
""
-
path
String pathStructure path inside to be mapped to the field.- Returns:
- string path, if it is empty then the path is not used
- Default:
""
-
customType
String customTypeCustom type. It plays role only iftype()is UNDEFINED Keep attention! The value plays role only in build of script and it is not used in mapping!- Returns:
- type of the field, if empty then undefined
- Since:
- 2.0.0
- See Also:
- Default:
""
-
arraySizeExpr
String arraySizeExprExpression to represent array size of the field. Keep attention! The value plays role only in build of script and it is not used in mapping!- Returns:
- array size of the field, if empty then not defined
- Since:
- 2.0.0
- See Also:
- Default:
""
-
type
BinType typeType of mapped parsed structure element.- Returns:
- the mapped parsed structure element type
- See Also:
- Default:
UNDEFINED
-
bitOrder
JBBPBitOrder bitOrderOrder of bits for the field. NB! The Value has strong effect! A Numeric field content will be inverted during mapping or saving of the field if the value is MSB0 (Java uses standard LSB0)- Returns:
- LSB0 or MSB0 outOrder, LSB0 by default
- See Also:
- Default:
LSB0
-
custom
boolean customThe Flag shows that the field must be processed by a defined externally custom field processors during loading and saving.- Returns:
- true if the mapping field must be processed externally, false otherwise
- See Also:
- Default:
false
-
paramExpr
String paramExprExpression as extra part of type. It means take part in type[:extra] Keep attention! The value plays role only in build of script and it is not used in mapping!- Returns:
- extra value, if empty then undefined
- Since:
- 2.0.0
- See Also:
- Default:
""
-
bitNumber
JBBPBitNumber bitNumberThe Value defines how many bytes are actual ones in the field, works for numeric field and arrays and allows make mapping to bit fields.- Returns:
- the number of lower bits, by default 8 bits
- Since:
- 2.0.0
- See Also:
- Default:
BITS_8
-
byteOrder
JBBPByteOrder byteOrderByte order to be used for operations.- Returns:
- order of bytes to be used
- Since:
- 2.0.0
- See Also:
- Default:
BIG_ENDIAN
-
order
int orderThe Value defines the field order to show relative position in data stream. If -1then it is undefined.- Returns:
- the outOrder of the field as number (the mapping will make ascending sorting)
- Since:
- 2.0.0
- See Also:
- Default:
-1
-
comment
String commentJust either description of the field or some remark.- Returns:
- the comment as String
- Since:
- 1.1
- See Also:
- Default:
""
-