test_class.declarator: BASE_DIR = Paths.get((System.getProperty("basedir") == null) ? "." : System.getProperty("basedir")).toAbsolutePath().normalize()
test_class.modifier: final
test_class.original_string: final Path BASE_DIR = Paths.get((System.getProperty("basedir") == null) ? "." : System.getProperty("basedir")).toAbsolutePath().normalize();
test_class.type: Path
test_class.var_name: BASE_DIR
test_class.declarator: DICTIONARY_PATH = "src" + File.separator + "test" + File.separator + "resources" + File.separator + "testMessages.xml"
test_class.modifier: private static final
test_class.original_string: private static final String DICTIONARY_PATH = "src" + File.separator + "test" + File.separator + "resources" + File.separator + "testMessages.xml";
test_class.type: String
test_class.var_name: DICTIONARY_PATH
test_class.file: BackEnd/Core/sailfish-common/src/test/java/com/exactpro/sf/common/messages/TestMessageStructureReader.java
test_class.identifier: TestMessageStructureReader
test_case.body: @Test
      public void testTraverse() throws IOException {
          IDictionaryStructure dictionary = loadDictionary();
  
          IMessageStructure structure = dictionary.getMessages().get("TestMessage");
          IMessage message = DefaultMessageFactory.getFactory().createMessage(structure.getName(), dictionary.getNamespace());
          
          message.addField("Boolean", "true");
          message.addField("Byte", 1);
          message.addField("Short", 2);
          message.addField("Integer", "3");
          message.addField("Long", 4);
          message.addField("Float", 5.1);
          message.addField("Double", 6.2);
          message.addField("BigDecimal", "7");
          message.addField("Character", 8);
          message.addField("String", 9);
          message.addField("LocalDate", "2016-08-18");
          message.addField("LocalTime", "01:02:03.123456789");
          message.addField("LocalDateTime", "2016-08-18T01:02:03.123456789");
          message.addField("Collection", Arrays.asList("1", "2", "3", "4"));
  
          IMessageStructureVisitor visitor = new TestVisitor<>();
          MessageStructureReader.READER.traverse(visitor, structure, message, MessageStructureReaderHandlerImpl.instance());
          
          structure.getFields().forEach((fieldName, fldStructure) -> {
              String expectedType = fldStructure.getJavaType().value();
              if (fldStructure.isCollection()) {
                  message.<Iterable<?>>getField(fieldName).forEach(element ->
                          Assert.assertEquals(expectedType, element.getClass().getName()));
              } else {
                  Assert.assertEquals(expectedType, message.getField(fieldName).getClass().getName());
              }
          });
      }
test_case.class_method_signature: TestMessageStructureReader.testTraverse()
test_case.full_signature: @Test public void testTraverse()
test_case.identifier: testTraverse
test_case.invocations: loadDictionary get getMessages createMessage getFactory getName getNamespace addField addField addField addField addField addField addField addField addField addField addField addField addField addField asList traverse instance forEach getFields value getJavaType isCollection forEach getField assertEquals getName getClass assertEquals getName getClass getField
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testTraverse()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(MessageStructureReader.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(MessageStructureReader.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: READER = new MessageStructureReader()
focal_class.modifier: public static
focal_class.original_string: public static MessageStructureReader READER = new MessageStructureReader();
focal_class.type: MessageStructureReader
focal_class.var_name: READER
focal_class.file: BackEnd/Core/sailfish-common/src/main/java/com/exactpro/sf/common/messages/MessageStructureReader.java
focal_class.identifier: MessageStructureReader
focal_class.class_method_signature: MessageStructureReader.MessageStructureReader()
focal_class.full_signature: protected  MessageStructureReader()
focal_class.identifier: MessageStructureReader
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.signature:  MessageStructureReader()
focal_class.class_method_signature: MessageStructureReader.traverse(IMessageStructureVisitor msgStrVisitor,
                           IMessageStructure msgStructure,
                           IMessage message,
                           IMessageStructureReaderHandler handler)
focal_class.full_signature: public void traverse(IMessageStructureVisitor msgStrVisitor,
                           IMessageStructure msgStructure,
                           IMessage message,
                           IMessageStructureReaderHandler handler)
focal_class.identifier: traverse
focal_class.modifiers: public
focal_class.parameters: (IMessageStructureVisitor msgStrVisitor,
                           IMessageStructure msgStructure,
                           IMessage message,
                           IMessageStructureReaderHandler handler)
focal_class.return: void
focal_class.signature: void traverse(IMessageStructureVisitor msgStrVisitor,
                           IMessageStructure msgStructure,
                           IMessage message,
                           IMessageStructureReaderHandler handler)
focal_class.class_method_signature: MessageStructureReader.traverse(IMessageStructureVisitor msgStrVisitor,
              Map<String, IFieldStructure> fields,
  			IMessage message,
  			IMessageStructureReaderHandler handler)
focal_class.full_signature: public void traverse(IMessageStructureVisitor msgStrVisitor,
              Map<String, IFieldStructure> fields,
  			IMessage message,
  			IMessageStructureReaderHandler handler)
focal_class.identifier: traverse
focal_class.modifiers: public
focal_class.parameters: (IMessageStructureVisitor msgStrVisitor,
              Map<String, IFieldStructure> fields,
  			IMessage message,
  			IMessageStructureReaderHandler handler)
focal_class.return: void
focal_class.signature: void traverse(IMessageStructureVisitor msgStrVisitor,
              Map<String, IFieldStructure> fields,
  			IMessage message,
  			IMessageStructureReaderHandler handler)
focal_class.class_method_signature: MessageStructureReader.visitField(IFieldStructure curField, IMessageStructureVisitor msgStrVisitor, IMessageStructureReaderHandler handler,
              IMessage message, String fieldName, Object value)
focal_class.full_signature: protected void visitField(IFieldStructure curField, IMessageStructureVisitor msgStrVisitor, IMessageStructureReaderHandler handler,
              IMessage message, String fieldName, Object value)
focal_class.identifier: visitField
focal_class.modifiers: protected
focal_class.parameters: (IFieldStructure curField, IMessageStructureVisitor msgStrVisitor, IMessageStructureReaderHandler handler,
              IMessage message, String fieldName, Object value)
focal_class.return: void
focal_class.signature: void visitField(IFieldStructure curField, IMessageStructureVisitor msgStrVisitor, IMessageStructureReaderHandler handler,
              IMessage message, String fieldName, Object value)
focal_class.class_method_signature: MessageStructureReader.visitSimpleField(IFieldStructure curField, IMessageStructureVisitor msgStrVisitor, IMessage message,
                                          JavaType javaType, String fieldName, Object value, boolean isDefault)
focal_class.full_signature: @SuppressWarnings("unchecked") protected void visitSimpleField(IFieldStructure curField, IMessageStructureVisitor msgStrVisitor, IMessage message,
                                          JavaType javaType, String fieldName, Object value, boolean isDefault)
focal_class.identifier: visitSimpleField
focal_class.modifiers: @SuppressWarnings("unchecked") protected
focal_class.parameters: (IFieldStructure curField, IMessageStructureVisitor msgStrVisitor, IMessage message,
                                          JavaType javaType, String fieldName, Object value, boolean isDefault)
focal_class.return: void
focal_class.signature: void visitSimpleField(IFieldStructure curField, IMessageStructureVisitor msgStrVisitor, IMessage message,
                                          JavaType javaType, String fieldName, Object value, boolean isDefault)
focal_class.class_method_signature: MessageStructureReader.castByDictionary(IMessage message, String fieldName, Object value, Class<T> clazz, boolean isDefault)
focal_class.full_signature: private T castByDictionary(IMessage message, String fieldName, Object value, Class<T> clazz, boolean isDefault)
focal_class.identifier: castByDictionary
focal_class.modifiers: private
focal_class.parameters: (IMessage message, String fieldName, Object value, Class<T> clazz, boolean isDefault)
focal_class.return: T
focal_class.signature: T castByDictionary(IMessage message, String fieldName, Object value, Class<T> clazz, boolean isDefault)
focal_class.class_method_signature: MessageStructureReader.castCollectionByDictionary(IMessage message, String fieldName, Object value, Class<T> clazz, boolean isDefault)
focal_class.full_signature: private List<T> castCollectionByDictionary(IMessage message, String fieldName, Object value, Class<T> clazz, boolean isDefault)
focal_class.identifier: castCollectionByDictionary
focal_class.modifiers: private
focal_class.parameters: (IMessage message, String fieldName, Object value, Class<T> clazz, boolean isDefault)
focal_class.return: List<T>
focal_class.signature: List<T> castCollectionByDictionary(IMessage message, String fieldName, Object value, Class<T> clazz, boolean isDefault)
focal_class.class_method_signature: MessageStructureReader.visitComplexField(IFieldStructure curField, IMessageStructureVisitor msgStrVisitor, String fieldName, Object value)
focal_class.full_signature: @SuppressWarnings("unchecked") protected void visitComplexField(IFieldStructure curField, IMessageStructureVisitor msgStrVisitor, String fieldName, Object value)
focal_class.identifier: visitComplexField
focal_class.modifiers: @SuppressWarnings("unchecked") protected
focal_class.parameters: (IFieldStructure curField, IMessageStructureVisitor msgStrVisitor, String fieldName, Object value)
focal_class.return: void
focal_class.signature: void visitComplexField(IFieldStructure curField, IMessageStructureVisitor msgStrVisitor, String fieldName, Object value)
focal_method.body: public void traverse(IMessageStructureVisitor msgStrVisitor,
                           IMessageStructure msgStructure,
                           IMessage message,
                           IMessageStructureReaderHandler handler)
  	{
  		try
  		{
              traverse(msgStrVisitor, msgStructure.getFields(), message, handler);
  		}
  		catch ( Exception e )
  		{
              StringBuilder builder = new StringBuilder();
              builder.append(e.getMessage()).append(". in MessageStructure Name = [");
              if(msgStructure != null && msgStructure.getName() != null){
                  builder.append(msgStructure.getName());
              }
              builder.append("]");
  			throw new EPSCommonException(builder.toString(), e);
  		}
  	}
focal_method.class_method_signature: MessageStructureReader.traverse(IMessageStructureVisitor msgStrVisitor,
                           IMessageStructure msgStructure,
                           IMessage message,
                           IMessageStructureReaderHandler handler)
focal_method.full_signature: public void traverse(IMessageStructureVisitor msgStrVisitor,
                           IMessageStructure msgStructure,
                           IMessage message,
                           IMessageStructureReaderHandler handler)
focal_method.identifier: traverse
focal_method.invocations: traverse getFields append append getMessage getName append getName append toString
focal_method.modifiers: public
focal_method.parameters: (IMessageStructureVisitor msgStrVisitor,
                           IMessageStructure msgStructure,
                           IMessage message,
                           IMessageStructureReaderHandler handler)
focal_method.return: void
focal_method.signature: void traverse(IMessageStructureVisitor msgStrVisitor,
                           IMessageStructure msgStructure,
                           IMessage message,
                           IMessageStructureReaderHandler handler)