@@ -45,15 +45,12 @@ public class JavaGenerator implements CodeGenerator
4545 private static final String INDENT = " " ;
4646 private static final String GEN_COMPOSITE_DECODER_FLYWEIGHT = "CompositeDecoderFlyweight" ;
4747 private static final String GEN_COMPOSITE_ENCODER_FLYWEIGHT = "CompositeEncoderFlyweight" ;
48- private static final String GEN_COMPOSITE_STRUCTURE = "CompositeStructure" ;
4948 private static final String GEN_DECODER_FLYWEIGHT = "DecoderFlyweight" ;
5049 private static final String GEN_ENCODER_FLYWEIGHT = "EncoderFlyweight" ;
5150 private static final String GEN_FLYWEIGHT = "Flyweight" ;
5251 private static final String GEN_MESSAGE_DECODER_FLYWEIGHT = "MessageDecoderFlyweight" ;
5352 private static final String GEN_MESSAGE_ENCODER_FLYWEIGHT = "MessageEncoderFlyweight" ;
5453 private static final String GEN_MESSAGE_FLYWEIGHT = "MessageFlyweight" ;
55- private static final String GEN_MESSAGE_STRUCTURE = "MessageStructure" ;
56- private static final String GEN_STRUCTURE = "Structure" ;
5754
5855 private final Ir ir ;
5956 private final OutputManager outputManager ;
@@ -124,11 +121,6 @@ private String decoderName(final String className)
124121 return className + "Decoder" ;
125122 }
126123
127- private String structureName (final String className )
128- {
129- return className + "Structure" ;
130- }
131-
132124 private void copyInterface (String simpleInterfaceName ) throws IOException
133125 {
134126 final String resource = String .format ("/java/interfaces/%s.java" , simpleInterfaceName );
@@ -152,15 +144,12 @@ public void generateInterfaces() throws IOException
152144 {
153145 copyInterface (GEN_COMPOSITE_DECODER_FLYWEIGHT );
154146 copyInterface (GEN_COMPOSITE_ENCODER_FLYWEIGHT );
155- copyInterface (GEN_COMPOSITE_STRUCTURE );
156147 copyInterface (GEN_DECODER_FLYWEIGHT );
157148 copyInterface (GEN_ENCODER_FLYWEIGHT );
158149 copyInterface (GEN_FLYWEIGHT );
159150 copyInterface (GEN_MESSAGE_DECODER_FLYWEIGHT );
160151 copyInterface (GEN_MESSAGE_ENCODER_FLYWEIGHT );
161152 copyInterface (GEN_MESSAGE_FLYWEIGHT );
162- copyInterface (GEN_MESSAGE_STRUCTURE );
163- copyInterface (GEN_STRUCTURE );
164153 }
165154 }
166155
@@ -171,7 +160,7 @@ private String implementsInterface(final String tokenName, final String interfac
171160 return "" ;
172161 }
173162
174- return String .format (" implements %s<%s> " , interfaceName , formatClassName ( structureName ( tokenName )) );
163+ return String .format (" implements %s" , interfaceName );
175164 }
176165
177166 public void generateMessageHeaderStub () throws IOException
@@ -194,22 +183,6 @@ public void generateMessageHeaderStub() throws IOException
194183 }
195184 }
196185
197- private void generateMessageStructure (final Token msgToken ) throws IOException
198- {
199- if (!generateInterfaces )
200- {
201- return ;
202- }
203-
204- final String structName = formatClassName (structureName (msgToken .name ()));
205- try (final Writer out = outputManager .createOutput (structName ))
206- {
207- out .append (generateStructureFileHeader (structName , ir .applicableNamespace (), GEN_MESSAGE_STRUCTURE ));
208- out .append (generateDeclaration ("class" , structName , " implements " + GEN_MESSAGE_STRUCTURE ));
209- out .append ("}\n " );
210- }
211- }
212-
213186 public void generateTypeStubs () throws IOException
214187 {
215188 generateMetaAttributeEnum ();
@@ -254,7 +227,6 @@ public void generate() throws IOException
254227 final List <Token > varData = new ArrayList <>();
255228 collectVarData (messageBody , i , varData );
256229
257- generateMessageStructure (msgToken );
258230 generateDecoder (BASE_INDENT , fields , groups , varData , msgToken );
259231 generateEncoder (BASE_INDENT , fields , groups , varData , msgToken );
260232 }
@@ -1061,17 +1033,6 @@ private void generateComposite(final List<Token> tokens) throws IOException
10611033 final String decoderName = decoderName (compositeName );
10621034 final String encoderName = encoderName (compositeName );
10631035
1064- if (generateInterfaces )
1065- {
1066- final String structureName = structureName (compositeName );
1067- try (final Writer out = outputManager .createOutput (structureName ))
1068- {
1069- out .append (generateStructureFileHeader (structureName , ir .applicableNamespace (), GEN_COMPOSITE_STRUCTURE ));
1070- out .append (generateDeclaration ("class" , structureName , " implements " + GEN_COMPOSITE_STRUCTURE ));
1071- out .append ("}\n " );
1072- }
1073- }
1074-
10751036 try (final Writer out = outputManager .createOutput (decoderName ))
10761037 {
10771038 final String implementsString = implementsInterface (token .name (), GEN_COMPOSITE_DECODER_FLYWEIGHT );
@@ -1366,22 +1327,6 @@ private static CharSequence generateEnumFileHeader(final String className, final
13661327 );
13671328 }
13681329
1369- private static CharSequence generateStructureFileHeader (final String className , final String packageName ,
1370- String structureInterface )
1371- {
1372- return String .format (
1373- "/* Generated SBE (Simple Binary Encoding) message codec */\n " +
1374- "package %s;\n \n " +
1375- "import %s.%s;\n \n " +
1376- "@javax.annotation.Generated(value = {\" %s.%s\" })\n " ,
1377- packageName ,
1378- JAVA_INTERFACE_PACKAGE ,
1379- structureInterface ,
1380- packageName ,
1381- className
1382- );
1383- }
1384-
13851330 private void generateAnnotations (
13861331 final String indent ,
13871332 final String className ,
0 commit comments