- Writer writer = new StringWriter();
- if (type instanceof GeneratedType) {
- GeneratedType genType = (GeneratedType) type;
-
- final List<Constant> constants = genType.getConstantDefinitions();
- final List<MethodSignature> methods = genType
- .getMethodDefinitions();
- final List<Enumeration> enums = genType.getEnumDefintions();
-
- writer.write(GeneratorUtil.createIfcDeclarationWithPkgName(genType,
- ""));
- writer.write(NL);
-
- if (constants != null) {
- for (Constant c : constants) {
- writer.write(GeneratorUtil.createConstant(c, TAB) + NL);
- }
- writer.write(NL);
- }
-
- if (methods != null) {
- for (MethodSignature m : methods) {
- writer.write(GeneratorUtil.createMethodDeclaration(m, TAB)
- + NL);
- }
- writer.write(NL);
- }
-
- if (enums != null) {
- for (Enumeration e : enums) {
- writer.write(GeneratorUtil.createEnum(e, TAB) + NL);
- }
- writer.write(NL);
- }
-
- writer.write(RCB);
+ final Writer writer = new StringWriter();
+ if (type instanceof GeneratedType && !(type instanceof GeneratedTransferObject)) {
+ final GeneratedType genType = (GeneratedType) type;
+ final InterfaceTemplate interfaceTemplate = new InterfaceTemplate(genType);
+ writer.write(interfaceTemplate.generate().toString());