public class Ir extends Object
Constructor and Description |
---|
Ir(String packageName,
String namespaceName,
int id,
int version,
String semanticVersion,
ByteOrder byteOrder,
List<Token> headerTokens)
Create a new IR container taking a defensive copy of the headerStructure
Token s passed. |
Modifier and Type | Method and Description |
---|---|
void |
addMessage(long messageId,
List<Token> messageTokens)
Add a List of
Token s for a given message id. |
String |
applicableNamespace()
Get the namespaceName to be used for generated code.
|
ByteOrder |
byteOrder()
ByteOrder for all types in the schema. |
List<Token> |
getMessage(long messageId)
Get the getMessage for a given identifier.
|
List<Token> |
getType(String name)
Get the type representation for a given type name.
|
HeaderStructure |
headerStructure()
Return the
HeaderStructure description for all messages. |
int |
id()
Get the id number of the schema.
|
Collection<List<Token>> |
messages()
The
Collection of messages in this schema. |
String |
namespaceName()
Get the namespaceName to be used for generated code.
|
String[] |
namespaces()
Get the namespaces array to be used for generated code.
|
String |
packageName()
Get the package name to be used for generated code.
|
String |
semanticVersion()
Get the semantic version of the schema.
|
Collection<List<Token>> |
types()
Get the
Collection of types in for this schema. |
static void |
updateComponentTokenCounts(List<Token> tokens)
Iterate over a list of
Token s and update their counts of how many tokens make up each component. |
int |
version()
Get the version of the schema.
|
public Ir(String packageName, String namespaceName, int id, int version, String semanticVersion, ByteOrder byteOrder, List<Token> headerTokens)
Token
s passed.packageName
- that should be applied to generated code.namespaceName
- that should be applied to generated code.id
- identifier for the schema.version
- of the schemasemanticVersion
- semantic version for mapping to the application domain.byteOrder
- byte order for all types in the schema.headerTokens
- representing the message headerStructure.public HeaderStructure headerStructure()
HeaderStructure
description for all messages.HeaderStructure
description for all messages.public void addMessage(long messageId, List<Token> messageTokens)
Token
s for a given message id.messageId
- to identify the list of tokens for the message.messageTokens
- the List of Token
s representing the message.public List<Token> getMessage(long messageId)
messageId
- to get.Token
s representing the message or null if the id is not found.public List<Token> getType(String name)
name
- of type to get.Token
s representing the type or null if the name is not found.public Collection<List<Token>> types()
Collection
of types in for this schema.Collection
of types in for this schema.public Collection<List<Token>> messages()
Collection
of messages in this schema.Collection
of messages in this schema.public String packageName()
public String namespaceName()
public String[] namespaces()
public int id()
public int version()
public String semanticVersion()
public ByteOrder byteOrder()
ByteOrder
for all types in the schema.ByteOrder
for all types in the schema.public String applicableNamespace()
If namespaceName
is null then packageName
is used.
Copyright © 2014-2019 Real Logic Ltd. All Rights Reserved.