Package de.gsi.serializer
Interface FieldDescription
-
- All Known Implementing Classes:
ClassFieldDescription,ProtocolInfo,WireDataFieldDescription
public interface FieldDescription
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description FieldDescriptionfindChildField(int fieldNameHashCode, java.lang.String fieldName)FieldDescriptionfindChildField(java.lang.String fieldName)java.util.List<FieldDescription>getChildren()intgetDataSize()intgetDataStartOffset()intgetDataStartPosition()DataTypegetDataType()java.lang.StringgetFieldDescription()java.lang.StringgetFieldDirection()Return optional meta data tag describing the 'direction' of this data field.java.util.List<java.lang.String>getFieldGroups()java.lang.StringgetFieldName()intgetFieldNameHashCode()intgetFieldStart()java.lang.StringgetFieldUnit()FieldDescriptiongetParent()java.lang.reflect.TypegetType()booleanisAnnotationPresent()voidprintFieldStructure()Prints the class field structure to the logging output for diagnostics purposes starting from this element as a root.
-
-
-
Method Detail
-
isAnnotationPresent
boolean isAnnotationPresent()
-
findChildField
FieldDescription findChildField(java.lang.String fieldName)
-
findChildField
FieldDescription findChildField(int fieldNameHashCode, java.lang.String fieldName)
-
getChildren
java.util.List<FieldDescription> getChildren()
-
getDataSize
int getDataSize()
- Returns:
- the data size in bytes stored after the field header
-
getDataStartOffset
int getDataStartOffset()
- Returns:
- the offset in bytes from the field start position until the first data object can be read. (N.B. equals to 'getFieldstart() + getDataOffset()', the data ends at 'getDataStartOffset() + getDataSize()'
-
getDataStartPosition
int getDataStartPosition()
- Returns:
- the buffer byte position from where the first data object can be read
-
getFieldDescription
java.lang.String getFieldDescription()
- Returns:
- optional meta data tag describing the purpose of this data field (N.B. can be empty String)
-
getFieldDirection
java.lang.String getFieldDirection()
Return optional meta data tag describing the 'direction' of this data field. The information encodes the source servicedevelopers intend to the receiving user whether the field can be, for example, modified (get/set), set-only, or read-only, or attach any other similar information. Encoding/interpretation is left ad-lib to the source service developer.- Returns:
- optional meta data (N.B. can be empty String).
-
getFieldGroups
java.util.List<java.lang.String> getFieldGroups()
- Returns:
- optional meta data tag describing the group/set this data field belongs to (N.B. can be empty String, corresponding to 'all')
-
getFieldName
java.lang.String getFieldName()
- Returns:
- the data field's name
-
getFieldNameHashCode
int getFieldNameHashCode()
- Returns:
- the data field name's hashcode (N.B. used for faster identification of the field)
-
getFieldStart
int getFieldStart()
- Returns:
- buffer position in byte where the data field header starts
-
getFieldUnit
java.lang.String getFieldUnit()
- Returns:
- optional meta data tag describing the field's SI unit or similar (N.B. can be empty String)
-
getParent
FieldDescription getParent()
- Returns:
- for a hierarchical/nested data structure refers to the parent this field belongs to (N.B. can be null if there isn't a parent, e.g. for a root element)
-
getType
java.lang.reflect.Type getType()
-
printFieldStructure
void printFieldStructure()
Prints the class field structure to the logging output for diagnostics purposes starting from this element as a root. N.B. regarding formatting/parsing The indentation depth is controlled viaClassUtils.setIndentationNumberOfSpace(int). The max recursion depth during the class structure parsing is controlled viaClassUtils.setMaxRecursionDepth(int).
-
-