File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
sbe-tool/src/main/java/uk/co/real_logic/sbe/ir Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 1818import org .agrona .Verify ;
1919
2020import java .util .*;
21+ import java .util .regex .Pattern ;
2122
2223/**
2324 * Intermediate representation of SBE messages to be used for the generation of encoders and decoders
@@ -35,6 +36,8 @@ public class Ir
3536 private final Map <Long , List <Token >> messagesByIdMap = new HashMap <>();
3637 private final Map <String , List <Token >> typesByNameMap = new HashMap <>();
3738
39+ private final String [] namespaces ;
40+
3841 /**
3942 * Create a new IR container taking a defensive copy of the headerStructure {@link Token}s passed.
4043 *
@@ -62,6 +65,8 @@ public Ir(
6265 this .version = version ;
6366 this .semanticVersion = semanticVersion ;
6467 this .headerStructure = new HeaderStructure (new ArrayList <>(headerTokens ));
68+
69+ this .namespaces = Pattern .compile ("\\ ." ).split (namespaceName == null ? packageName : namespaceName );
6570 }
6671
6772 /**
@@ -153,6 +158,16 @@ public String namespaceName()
153158 return namespaceName ;
154159 }
155160
161+ /**
162+ * Get the namespaces array to be used for generated code.
163+ *
164+ * @return the namespaces array to be used for generated code.
165+ */
166+ public String [] namespaces ()
167+ {
168+ return namespaces ;
169+ }
170+
156171 /**
157172 * Get the id number of the schema.
158173 *
You can’t perform that action at this time.
0 commit comments