public class Ir
extends java.lang.Object
Constructor and Description |
---|
Ir(java.lang.String packageName,
java.lang.String namespaceName,
int id,
int version,
java.lang.String semanticVersion,
java.nio.ByteOrder byteOrder,
java.util.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,
java.util.List<Token> messageTokens)
Add a List of
Token s for a given message id. |
java.lang.String |
applicableNamespace()
Get the namespaceName to be used for generated code.
|
java.nio.ByteOrder |
byteOrder()
ByteOrder for all types in the schema. |
java.util.List<Token> |
getMessage(long messageId)
Get the getMessage for a given identifier.
|
java.util.List<Token> |
getType(java.lang.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.
|
java.util.Collection<java.util.List<Token>> |
messages()
The
Collection of messages in this schema. |
java.lang.String |
namespaceName()
Get the namespaceName to be used for generated code.
|
java.lang.String[] |
namespaces()
Get the namespaces array to be used for generated code.
|
java.lang.String |
packageName()
Get the package name to be used for generated code.
|
java.lang.String |
semanticVersion()
Get the semantic version of the schema.
|
java.util.Collection<java.util.List<Token>> |
types()
Get the
Collection of types in for this schema. |
static void |
updateComponentTokenCounts(java.util.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(java.lang.String packageName, java.lang.String namespaceName, int id, int version, java.lang.String semanticVersion, java.nio.ByteOrder byteOrder, java.util.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, java.util.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 java.util.List<Token> getMessage(long messageId)
messageId
- to get.Token
s representing the message or null if the id is not found.public java.util.List<Token> getType(java.lang.String name)
name
- of type to get.Token
s representing the type or null if the name is not found.public java.util.Collection<java.util.List<Token>> types()
Collection
of types in for this schema.Collection
of types in for this schema.public java.util.Collection<java.util.List<Token>> messages()
Collection
of messages in this schema.Collection
of messages in this schema.public java.lang.String packageName()
public java.lang.String namespaceName()
public java.lang.String[] namespaces()
public int id()
public int version()
public java.lang.String semanticVersion()
public java.nio.ByteOrder byteOrder()
ByteOrder
for all types in the schema.ByteOrder
for all types in the schema.public java.lang.String applicableNamespace()
If namespaceName
is null then packageName
is used.
Copyright © 2014-2018 Real Logic Ltd. All Rights Reserved.