org.testng.xml.dom.Wrapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of testng Show documentation
Show all versions of testng Show documentation
Testing framework for Java
package org.testng.xml.dom;
import org.testng.collections.Lists;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
import java.lang.annotation.Annotation;
import java.util.List;
public class Wrapper {
private OnElement m_onElement;
private OnElementList m_onElementList;
private Tag m_tag;
private TagContent m_tagContent;
private Object m_bean;
public Wrapper(Annotation a, Object bean) {
m_bean = bean;
if (a instanceof OnElement) m_onElement = (OnElement) a;
else if (a instanceof OnElementList) m_onElementList = (OnElementList) a;
else if (a instanceof Tag) m_tag = (Tag) a;
else if (a instanceof TagContent) m_tagContent = (TagContent) a;
else throw new RuntimeException("Illegal annotation " + a);
}
public String getTagName() {
if (m_onElement != null) return m_onElement.tag();
else if (m_onElementList != null) return m_onElementList.tag();
else return m_tag.name();
}
public List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy