public class DefaultFromCobolChoiceStrategy extends Object implements FromCobolChoiceStrategy
Alternatives are taken in the order they were added to the Choice. The first one that validates (mainframe data is compatible) is selected.
If no alternative validates, returns null.
| Constructor and Description |
|---|
DefaultFromCobolChoiceStrategy(CobolContext cobolContext) |
| Modifier and Type | Method and Description |
|---|---|
CobolType |
choose(String choiceFieldName,
CobolChoiceType cobolChoiceType,
Map<String,Object> variables,
byte[] hostData,
int start,
int length)
Select one alternative in choices.
|
Set<String> |
getVariableNames()
Provides a list of variable names whose values are to be collected before
the choice is reached.
|
public DefaultFromCobolChoiceStrategy(CobolContext cobolContext)
public CobolType choose(String choiceFieldName, CobolChoiceType cobolChoiceType, Map<String,Object> variables, byte[] hostData, int start, int length)
FromCobolChoiceStrategychoose in interface FromCobolChoiceStrategychoiceFieldName - the choice field name in the parent structure.cobolChoiceType - the choice field typevariables - contains all custom variables values collected before
reaching the choicehostData - the host datastart - the start position within the host data for the entire
parent structurelength - how many bytes of hostData contains actual data to processpublic Set<String> getVariableNames()
FromCobolChoiceStrategygetVariableNames in interface FromCobolChoiceStrategyCopyright © 2021 LegSem. All rights reserved.