public class Generators extends Object
CodeGenerators.| Constructor and Description |
|---|
Generators() |
| Modifier and Type | Method and Description |
|---|---|
static Token |
findFirst(String name,
List<Token> tokens,
int index)
Find the first token with a given name from an index inclusive.
|
static void |
forEachField(List<Token> tokens,
BiConsumer<Token,Token> consumer)
For each field found in a list of field
Tokens take the field token and following type token to
a BiConsumer. |
static String |
toLowerFirstChar(String s)
Lowercase the first character of a given String.
|
static String |
toUpperFirstChar(String s)
Uppercase the first character of a given String.
|
public static void forEachField(List<Token> tokens, BiConsumer<Token,Token> consumer)
Tokens take the field token and following type token to
a BiConsumer.tokens - to be iterated over.consumer - to for the field and encoding token pair.public static String toUpperFirstChar(String s)
s - to have the first character upper-cased.public static String toLowerFirstChar(String s)
s - to have the first character upper-cased.public static Token findFirst(String name, List<Token> tokens, int index)
name - to search for.tokens - to search.index - from which to search.Token or throw a IllegalStateException if not found.Copyright © 2013-2024 Real Logic Limited. All Rights Reserved.