Package uk.co.real_logic.sbe.generation
Class Generators
java.lang.Object
uk.co.real_logic.sbe.generation.Generators
Common operations available to all
CodeGenerators.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TokenFind the first token with a given name from an index inclusive.static voidforEachField(List<Token> tokens, BiConsumer<Token, Token> consumer) For each field found in a list of fieldTokens take the field token and following type token to aBiConsumer.static StringLowercase the first character of a given String.static StringUppercase the first character of a given String.
-
Constructor Details
-
Generators
public Generators()
-
-
Method Details
-
forEachField
For each field found in a list of fieldTokens take the field token and following type token to aBiConsumer.- Parameters:
tokens- to be iterated over.consumer- to for the field and encoding token pair.
-
toUpperFirstChar
Uppercase the first character of a given String.- Parameters:
s- to have the first character upper-cased.- Returns:
- a new String with the first character in uppercase.
-
toLowerFirstChar
Lowercase the first character of a given String.- Parameters:
s- to have the first character upper-cased.- Returns:
- a new String with the first character in uppercase.
-
findFirst
Find the first token with a given name from an index inclusive.- Parameters:
name- to search for.tokens- to search.index- from which to search.- Returns:
- first found
Tokenor throw aIllegalStateExceptionif not found.
-