Package org.openjdk.jmc.common.util
Class StateElement
- java.lang.Object
-
- org.openjdk.jmc.common.util.StateElement
-
-
Field Summary
Fields Modifier and Type Field Description private org.w3c.dom.Elementelementprivate static IState[]NO_CHILDREN
-
Constructor Summary
Constructors Constructor Description StateElement(org.w3c.dom.Element element)Create a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetAttribute(java.lang.String key)Gets a named attribute value.java.lang.String[]getAttributeKeys()Return an array with the attribute keys for this state.IStategetChild(java.lang.String type)Gets a child of the named type.IState[]getChildren()Gets all child nodes.IState[]getChildren(java.lang.String type)Gets all child nodes of a named type.java.lang.StringgetType()Get the node type of this state.
-
-
-
Field Detail
-
NO_CHILDREN
private static final IState[] NO_CHILDREN
-
element
private final org.w3c.dom.Element element
-
-
Method Detail
-
getType
public java.lang.String getType()
Description copied from interface:IStateGet the node type of this state.
-
getAttributeKeys
public java.lang.String[] getAttributeKeys()
Description copied from interface:IStateReturn an array with the attribute keys for this state.- Specified by:
getAttributeKeysin interfaceIState- Returns:
- attribute keys
-
getAttribute
public java.lang.String getAttribute(java.lang.String key)
Description copied from interface:IStateGets a named attribute value.- Specified by:
getAttributein interfaceIState- Parameters:
key- attribute key- Returns:
- attribute value
-
getChild
public IState getChild(java.lang.String type)
Description copied from interface:IStateGets a child of the named type. If there are several child nodes of the same type then any of them may be returned.
-
getChildren
public IState[] getChildren()
Description copied from interface:IStateGets all child nodes.- Specified by:
getChildrenin interfaceIState- Returns:
- an array of child nodes
-
getChildren
public IState[] getChildren(java.lang.String type)
Description copied from interface:IStateGets all child nodes of a named type.- Specified by:
getChildrenin interfaceIState- Parameters:
type- node type- Returns:
- an array of child nodes
-
-