public final class GenerationUtil extends Object
Constructor and Description |
---|
GenerationUtil() |
Modifier and Type | Method and Description |
---|---|
static int |
collect(Signal signal,
List<Token> tokens,
int index,
List<Token> collected)
Collect a run of tokens matching a signal.
|
static int |
collectFields(List<Token> tokens,
int index,
List<Token> fields)
Collect the fields for a message.
|
static int |
collectGroups(List<Token> tokens,
int index,
List<Token> groups)
Collect the groups for a message.
|
static int |
collectVarData(List<Token> tokens,
int index,
List<Token> varData)
Collect the var data for a message.
|
static int |
findEndSignal(List<Token> tokens,
int index,
Signal signal,
String name)
Find the index of the end signal for a given name.
|
static int |
findSignal(List<Token> tokens,
Signal signal)
Find the first instance of a given signal.
|
static List<String> |
findSubGroupNames(List<Token> tokens)
Find a list of sub-group names.
|
static List<Token> |
getMessageBody(List<Token> tokens)
Get the tokens for the message body by subtracting the message wrapper.
|
public static int collectFields(List<Token> tokens, int index, List<Token> fields)
tokens
- for the message.index
- index at which to begin.fields
- to collect the field tokens into.public static int collectGroups(List<Token> tokens, int index, List<Token> groups)
tokens
- for the message.index
- index at which to begin.groups
- to collect the group tokens into.public static int collectVarData(List<Token> tokens, int index, List<Token> varData)
tokens
- for the message.index
- index at which to begin.varData
- to collect the var data tokens into.public static int collect(Signal signal, List<Token> tokens, int index, List<Token> collected)
signal
- to match against.tokens
- for the message.index
- index at which to begin.collected
- to collect the tokens into.public static List<Token> getMessageBody(List<Token> tokens)
tokens
- for the message.public static int findEndSignal(List<Token> tokens, int index, Signal signal, String name)
tokens
- to search.index
- to start from.signal
- to match.name
- to match.public static List<String> findSubGroupNames(List<Token> tokens)
tokens
- to search.Copyright © 2013-2022 Real Logic Limited. All Rights Reserved.