Modifier and Type | Field and Description |
---|---|
static String |
CATEGORY
Main plugin category for plugins which are represented as a configuration node.
|
Constructor and Description |
---|
Node() |
Node(Node node) |
Node(Node parent,
String name,
PluginType<?> type)
Creates a new instance of
Node and initializes it
with a name and the corresponding XML element. |
Modifier and Type | Method and Description |
---|---|
Map<String,String> |
getAttributes() |
List<Node> |
getChildren() |
String |
getName() |
<T> T |
getObject() |
<T> T |
getObject(Class<T> clazz)
Returns this node's object cast to the given class.
|
Node |
getParent() |
PluginType<?> |
getType() |
String |
getValue() |
boolean |
hasChildren() |
boolean |
isInstanceOf(Class<?> clazz)
Determines if this node's object is an instance of the given class.
|
boolean |
isRoot() |
void |
setObject(Object obj) |
void |
setValue(String value) |
String |
toString() |
public static final String CATEGORY
public Node(Node parent, String name, PluginType<?> type)
Node
and initializes it
with a name and the corresponding XML element.parent
- the node's parent.name
- the node's name.type
- The Plugin Type associated with the node.public Node()
public Map<String,String> getAttributes()
public List<Node> getChildren()
public boolean hasChildren()
public boolean isRoot()
public <T> T getObject()
public <T> T getObject(Class<T> clazz)
T
- the type to cast to.clazz
- the class to cast this node's object to.public boolean isInstanceOf(Class<?> clazz)
clazz
- the class to check.true
if this node's object is an instance of the given class.public PluginType<?> getType()
Copyright © 1999-2021 The Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.