org.mockcentral.editor.nodes
Class JDomUtils

java.lang.Object
  extended by org.mockcentral.editor.nodes.JDomUtils

public class JDomUtils
extends java.lang.Object

Utility class providing methods for inspecting JDOM Element data.

Author:
David Hutchinson

Constructor Summary
JDomUtils()
           
 
Method Summary
static java.util.List<org.jdom.Element> getChildElements(org.jdom.Element element)
          Returns the children of the supplied Element.
static java.util.List<org.jdom.Element> getChildElements(org.jdom.Element element, java.lang.String childName)
          Returns the children of the supplied Element matching the supplied name.
static java.util.Set<MockCentralNode> getReferencingNodes(java.lang.String className, org.jdom.Document document)
          Returns a Set of all MockCentralNode instances which reference the supplied class name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDomUtils

public JDomUtils()
Method Detail

getChildElements

public static java.util.List<org.jdom.Element> getChildElements(org.jdom.Element element,
                                                                java.lang.String childName)
Returns the children of the supplied Element matching the supplied name.

Parameters:
element - the Element.
childName - the name.
Returns:
the children of the supplied Element matching the supplied name.

getChildElements

public static java.util.List<org.jdom.Element> getChildElements(org.jdom.Element element)
Returns the children of the supplied Element.

Parameters:
element - the Element.
Returns:
the children of the supplied Element.

getReferencingNodes

public static java.util.Set<MockCentralNode> getReferencingNodes(java.lang.String className,
                                                                 org.jdom.Document document)
Returns a Set of all MockCentralNode instances which reference the supplied class name.

Parameters:
className - the name of the class.
document - the JDOM Document in which to search
Returns:
a Set of all MockCentralNode instances which reference the supplied class name.