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.Element
element
private 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.String
getAttribute(java.lang.String key)
Gets a named attribute value.java.lang.String[]
getAttributeKeys()
Return an array with the attribute keys for this state.IState
getChild(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.String
getType()
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:IState
Get the node type of this state.
-
getAttributeKeys
public java.lang.String[] getAttributeKeys()
Description copied from interface:IState
Return an array with the attribute keys for this state.- Specified by:
getAttributeKeys
in interfaceIState
- Returns:
- attribute keys
-
getAttribute
public java.lang.String getAttribute(java.lang.String key)
Description copied from interface:IState
Gets a named attribute value.- Specified by:
getAttribute
in interfaceIState
- Parameters:
key
- attribute key- Returns:
- attribute value
-
getChild
public IState getChild(java.lang.String type)
Description copied from interface:IState
Gets 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:IState
Gets all child nodes.- Specified by:
getChildren
in interfaceIState
- Returns:
- an array of child nodes
-
getChildren
public IState[] getChildren(java.lang.String type)
Description copied from interface:IState
Gets all child nodes of a named type.- Specified by:
getChildren
in interfaceIState
- Parameters:
type
- node type- Returns:
- an array of child nodes
-
-