test_class.file: rocket-core/src/test/java/cn/hikyson/rocket/parser/TaskParserTest.java
test_class.identifier: TaskParserTest
test_case.body: @Test
      public void parse() throws Exception {
  //        try {
  //            List<ConditionTask> conditionTasks = TaskParser.parse(RuntimeEnvironment.application, "task_list.xml");
  //            assertTrue(conditionTasks.size() == 5);
  //        } catch (Throwable throwable) {
  //            assertTrue(throwable.getLocalizedMessage(), false);
  //        }
      }
test_case.class_method_signature: TaskParserTest.parse()
test_case.full_signature: @Test public void parse()
test_case.identifier: parse
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void parse()
focal_class.file: rocket-core/src/main/java/cn/hikyson/rocket/parser/TaskParser.java
focal_class.identifier: TaskParser
focal_class.class_method_signature: TaskParser.parse(Context context, String filePath)
focal_class.full_signature: public static List<LaunchTask> parse(Context context, String filePath)
focal_class.identifier: parse
focal_class.modifiers: public static
focal_class.parameters: (Context context, String filePath)
focal_class.return: List<LaunchTask>
focal_class.signature: List<LaunchTask> parse(Context context, String filePath)
focal_method.body: public static List<LaunchTask> parse(Context context, String filePath) throws Throwable {
          List<LaunchTask> taskList = new ArrayList<>();
          Element root = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(context.getAssets().open(filePath)).getDocumentElement();
          NodeList taskElements = root.getElementsByTagName("task");
          if (taskElements == null || taskElements.getLength() == 0) {
              return taskList;
          }
          for (int i = 0; i < taskElements.getLength(); i++) {
              Element delegateElement = (Element) taskElements.item(i);
              String clzName = delegateElement.getTextContent();
              final String taskNameDisplay = delegateElement.getAttribute("name");
              Class<?> clz = Class.forName(clzName);
              LaunchTask taskInstance = (LaunchTask) clz.newInstance();
              if (!TextUtils.isEmpty(taskNameDisplay) && !taskNameDisplay.equals(taskInstance.taskName())) {
                  throw new IllegalStateException("Task name in assets must same as taskName in launchTask class, or u can just don't declare name field in assets");
              }
              taskList.add(taskInstance);
          }
          return taskList;
      }
focal_method.class_method_signature: TaskParser.parse(Context context, String filePath)
focal_method.full_signature: public static List<LaunchTask> parse(Context context, String filePath)
focal_method.identifier: parse
focal_method.invocations: getDocumentElement parse newDocumentBuilder newInstance open getAssets getElementsByTagName getLength getLength item getTextContent getAttribute forName newInstance isEmpty equals taskName add
focal_method.modifiers: public static
focal_method.parameters: (Context context, String filePath)
focal_method.return: List<LaunchTask>
focal_method.signature: List<LaunchTask> parse(Context context, String filePath)