All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.testng.xml.dom.TestNGTagFactory Maven / Gradle / Ivy

There is a newer version: 7.10.1
Show newest version
package org.testng.xml.dom;

import java.util.Map;

import org.testng.collections.Maps;

public class TestNGTagFactory implements ITagFactory {

  private Map> m_map = Maps.newHashMap();

  public TestNGTagFactory() {
//    m_map.put("suite-files", XDom.ChildSuite.class);
  }

  @Override
  public Class getClassForTag(String tag) {
    Class result = m_map.get(tag);
    if (result != null) {
      return result;
    } else {
      String className = "org.testng.xml.Xml" + Reflect.toCapitalizedCamelCase(tag);
      try {
        result = Class.forName(className);
      } catch (ClassNotFoundException e) {
        System.out.println("Couldn't find class " + className);
      }
    }

    return result;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy