@Test public void testConvertFlat01() { Cob2JaxbConverter <Flat01Record> converter = new Cob2JaxbConverter.Builder <Flat01Record>() .jaxbClass(Flat01Record.class) .jaxbWrapperFactory(new Flat01RecordJaxb()) .cobolComplexType(new CobolFlat01Record()) .build(); FromHostResult < Flat01Record > result = converter.convert( HexUtils.decodeHex("F0F0F1F0F4F3D5C1D4C5F0F0F0F0F4F3404040404040404040400215000F")); assertEquals(30, result.getBytesProcessed()); assertEquals("NAME000043", result.getValue().getComName()); assertEquals(1043, result.getValue().getComNumber()); assertEquals("2150.00", result.getValue().getComAmount().toString()); }
public FromHostResult < J > convert(byte[] hostData, int start, int length) { Cob2JaxbVisitor visitor = new Cob2JaxbVisitor(getCobolContext(), hostData, start, length, jaxbWrapperFactory); visitor.visit(getCobolComplexType()); JaxbWrapper < ? > jaxbWrapper = visitor .getLastObject(JaxbWrapper.class); return new FromHostResult < J >(visitor.getLastPos(), jaxbClass.cast(jaxbWrapper.getJaxb())); }
Cob2JaxbConverter extends AbstractCob2ObjectConverter < J > { public FromHostResult < J > convert(byte[] hostData, int start, int length) { Cob2JaxbVisitor visitor = new Cob2JaxbVisitor(getCobolContext(), hostData, start, length, jaxbWrapperFactory); visitor.visit(getCobolComplexType()); JaxbWrapper < ? > jaxbWrapper = visitor .getLastObject(JaxbWrapper.class); return new FromHostResult < J >(visitor.getLastPos(), jaxbClass.cast(jaxbWrapper.getJaxb())); } }
Cob2JaxbConverter extends AbstractCob2ObjectConverter < J > { public FromHostResult < J > convert(byte[] hostData, int start, int length) { Cob2JaxbVisitor visitor = new Cob2JaxbVisitor(getCobolContext(), hostData, start, length, jaxbWrapperFactory); visitor.visit(getCobolComplexType()); JaxbWrapper < ? > jaxbWrapper = visitor .getLastObject(JaxbWrapper.class); return new FromHostResult < J >(visitor.getLastPos(), jaxbClass.cast(jaxbWrapper.getJaxb())); } Cob2JaxbConverter(Builder < J > builder); }
Cob2JaxbConverter extends AbstractCob2ObjectConverter < J > { public FromHostResult < J > convert(byte[] hostData, int start, int length) { Cob2JaxbVisitor visitor = new Cob2JaxbVisitor(getCobolContext(), hostData, start, length, jaxbWrapperFactory); visitor.visit(getCobolComplexType()); JaxbWrapper < ? > jaxbWrapper = visitor .getLastObject(JaxbWrapper.class); return new FromHostResult < J >(visitor.getLastPos(), jaxbClass.cast(jaxbWrapper.getJaxb())); } Cob2JaxbConverter(Builder < J > builder); FromHostResult < J > convert(byte[] hostData, int start, int length); }
Cob2JaxbConverter extends AbstractCob2ObjectConverter < J > { public FromHostResult < J > convert(byte[] hostData, int start, int length) { Cob2JaxbVisitor visitor = new Cob2JaxbVisitor(getCobolContext(), hostData, start, length, jaxbWrapperFactory); visitor.visit(getCobolComplexType()); JaxbWrapper < ? > jaxbWrapper = visitor .getLastObject(JaxbWrapper.class); return new FromHostResult < J >(visitor.getLastPos(), jaxbClass.cast(jaxbWrapper.getJaxb())); } Cob2JaxbConverter(Builder < J > builder); FromHostResult < J > convert(byte[] hostData, int start, int length);  }