Class FieldPrecedenceModel.CodecInteraction.CodecInteractionFactory
- Enclosing class:
- FieldPrecedenceModel.CodecInteraction
FieldPrecedenceModel.CodecInteraction instances. This factory
is used to hash-cons the instances, so that they can be compared by
reference.-
Method Summary
Modifier and TypeMethodDescriptionaccessField(Token token) Find or create aFieldPrecedenceModel.CodecInteractionto represent accessing the field identified by the given token.accessVarDataLength(Token token) Find or create aFieldPrecedenceModel.CodecInteractionto represent accessing the length of a variable-length data field without advancing the codec position.determineGroupHasElements(Token token) Find or create aFieldPrecedenceModel.CodecInteractionto represent determining a repeating group has elements.determineGroupIsEmpty(Token token) Find or create aFieldPrecedenceModel.CodecInteractionto represent determining a repeating group is empty.moveToLastElement(Token token) Find or create aFieldPrecedenceModel.CodecInteractionto represent moving to the last element in a repeating group.moveToNextElement(Token token) Find or create aFieldPrecedenceModel.CodecInteractionto represent moving to the next element in a repeating group.resetCountToIndex(Token token) Find or create aFieldPrecedenceModel.CodecInteractionto represent resetting the count of a repeating group to the current index.wrap(int version) Find or create aFieldPrecedenceModel.CodecInteractionto represent wrapping a codec around the given version of data.
-
Method Details
-
wrap
Find or create aFieldPrecedenceModel.CodecInteractionto represent wrapping a codec around the given version of data.- Parameters:
version- the version of data to wrap- Returns:
- the
FieldPrecedenceModel.CodecInteractioninstance
-
accessField
Find or create aFieldPrecedenceModel.CodecInteractionto represent accessing the field identified by the given token.The supplied token must carry a
Signal.BEGIN_FIELDorSignal.BEGIN_VAR_DATAsignal.- Parameters:
token- the token identifying the field- Returns:
- the
FieldPrecedenceModel.CodecInteractioninstance
-
determineGroupIsEmpty
Find or create aFieldPrecedenceModel.CodecInteractionto represent determining a repeating group is empty.For encoding, this will be when the group count is supplied, e.g.,
encoder.myGroupCount(0).For decoding, this will be when the group is read, e.g.,
decoder.myGroup().The supplied token must carry a
Signal.BEGIN_GROUPsignal.- Parameters:
token- the token identifying the group- Returns:
- the
FieldPrecedenceModel.CodecInteractioninstance
-
determineGroupHasElements
Find or create aFieldPrecedenceModel.CodecInteractionto represent determining a repeating group has elements.For encoding, this will be when the group count is supplied, e.g.,
encoder.myGroupCount(1).For decoding, this will be when the group is read, e.g.,
decoder.myGroup().The supplied token must carry a
Signal.BEGIN_GROUPsignal.- Parameters:
token- the token identifying the group- Returns:
- the
FieldPrecedenceModel.CodecInteractioninstance
-
moveToNextElement
Find or create aFieldPrecedenceModel.CodecInteractionto represent moving to the next element in a repeating group.For encoders, decoders, and codecs, this will be when the next element is accessed, e.g.,
myGroup.next()whenmyGroup.count - myGroup.index > 1.The supplied token must carry a
Signal.BEGIN_GROUPsignal.- Parameters:
token- the token identifying the group- Returns:
- the
FieldPrecedenceModel.CodecInteractioninstance
-
moveToLastElement
Find or create aFieldPrecedenceModel.CodecInteractionto represent moving to the last element in a repeating group.For encoders, decoders, and codecs, this will be when the last element is accessed, e.g.,
myGroup.next()whenmyGroup.count - myGroup.index == 1.- Parameters:
token- the token identifying the group- Returns:
- the
FieldPrecedenceModel.CodecInteractioninstance
-
resetCountToIndex
Find or create aFieldPrecedenceModel.CodecInteractionto represent resetting the count of a repeating group to the current index.For encoders, decoders, and codecs, this will be when the
resetCountToIndexmethod is called, e.g.,myGroup.resetCountToIndex().The supplied token must carry a
Signal.BEGIN_GROUPsignal.- Parameters:
token- the token identifying the group- Returns:
- the
FieldPrecedenceModel.CodecInteractioninstance
-
accessVarDataLength
Find or create aFieldPrecedenceModel.CodecInteractionto represent accessing the length of a variable-length data field without advancing the codec position.For decoders and codecs, this will be when the length is accessed, e.g.,
decoder.myVarDataLength().The supplied token must carry a
Signal.BEGIN_VAR_DATAsignal.- Parameters:
token- the token identifying the field- Returns:
- the
FieldPrecedenceModel.CodecInteractioninstance
-