@Test public void testConvertStru03Invalid() { try { Cob2ObjectVisitor visitor = new Cob2ObjectVisitor( cobolContext, HexUtils.decodeHex("F0F0F0F0F6F2D5C1D4C5F0F0F0F0F6F2404040404040404040400310000F003EC1C2001FC1C20014C1C20F0FC1C2000CC1C2")); visitor.visit(new CobolStru03Record()); fail(); } catch (FromCobolException e) { assertEquals( "Value 3855 is outside the required range [0, 99]." + " Error at offset 42 : [0x0310000F003EC1C2001FC1C20014C1C2->0F0F<-C1C2000CC1C2]." + " COBOL variable path: STRU03-RECORD[3]/COM-ARRAY/COM-ITEM1." + " COBOL type: CobolBinaryType", e.getMessage()); } }
public void visit(CobolComplexType type) { final Map < String, Object > map = new LinkedHashMap < String, Object >(); super.visitComplexType(type, new ObjectComplexTypeChildHandler(map)); resultObject = map; }
Cob2ObjectVisitor extends FromCobolVisitor { public void visit(CobolComplexType type) { final Map < String, Object > map = new LinkedHashMap < String, Object >(); super.visitComplexType(type, new ObjectComplexTypeChildHandler(map)); resultObject = map; } }
Cob2ObjectVisitor extends FromCobolVisitor { public void visit(CobolComplexType type) { final Map < String, Object > map = new LinkedHashMap < String, Object >(); super.visitComplexType(type, new ObjectComplexTypeChildHandler(map)); resultObject = map; } Cob2ObjectVisitor(CobolContext cobolContext, byte[] hostData);  Cob2ObjectVisitor(CobolContext cobolContext, byte[] hostData,
            int start, int length);  Cob2ObjectVisitor(CobolContext cobolContext, byte[] hostData,
            int start, int length, FromCobolChoiceStrategy customChoiceStrategy);  Cob2ObjectVisitor(CobolContext cobolContext, byte[] hostData,
            int start, int length,
            FromCobolChoiceStrategy customChoiceStrategy,
            Set < String > customVariables); }
Cob2ObjectVisitor extends FromCobolVisitor { public void visit(CobolComplexType type) { final Map < String, Object > map = new LinkedHashMap < String, Object >(); super.visitComplexType(type, new ObjectComplexTypeChildHandler(map)); resultObject = map; } Cob2ObjectVisitor(CobolContext cobolContext, byte[] hostData);  Cob2ObjectVisitor(CobolContext cobolContext, byte[] hostData,
            int start, int length);  Cob2ObjectVisitor(CobolContext cobolContext, byte[] hostData,
            int start, int length, FromCobolChoiceStrategy customChoiceStrategy);  Cob2ObjectVisitor(CobolContext cobolContext, byte[] hostData,
            int start, int length,
            FromCobolChoiceStrategy customChoiceStrategy,
            Set < String > customVariables); void visit(CobolComplexType type); void visit(CobolArrayType type); void visit(CobolChoiceType type); void visit(CobolPrimitiveType < ? > type); Object getResultObject(); }
Cob2ObjectVisitor extends FromCobolVisitor { public void visit(CobolComplexType type) { final Map < String, Object > map = new LinkedHashMap < String, Object >(); super.visitComplexType(type, new ObjectComplexTypeChildHandler(map)); resultObject = map; } Cob2ObjectVisitor(CobolContext cobolContext, byte[] hostData);  Cob2ObjectVisitor(CobolContext cobolContext, byte[] hostData,
            int start, int length);  Cob2ObjectVisitor(CobolContext cobolContext, byte[] hostData,
            int start, int length, FromCobolChoiceStrategy customChoiceStrategy);  Cob2ObjectVisitor(CobolContext cobolContext, byte[] hostData,
            int start, int length,
            FromCobolChoiceStrategy customChoiceStrategy,
            Set < String > customVariables); void visit(CobolComplexType type); void visit(CobolArrayType type); void visit(CobolChoiceType type); void visit(CobolPrimitiveType < ? > type); Object getResultObject();  }