Class Node
java.lang.Object
org.apache.logging.log4j.core.config.Node
A Configuration node.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()<T> T<T> TReturns this node's object cast to the given class.PluginType<?>getType()getValue()booleanbooleanisInstanceOf(Class<?> clazz) Determines if this node's object is an instance of the given class.booleanisRoot()voidvoidvoidtoString()
-
Field Details
-
CATEGORY
Main plugin category for plugins which are represented as a configuration node. Such plugins tend to be available as XML elements in a configuration file.- Since:
- 2.1
- See Also:
-
-
Constructor Details
-
Node
Creates a new instance ofNodeand initializes it with a name and the corresponding XML element.- Parameters:
parent- the node's parent.name- the node's name.type- The Plugin Type associated with the node.
-
Node
public Node() -
Node
-
-
Method Details
-
setParent
-
getAttributes
-
getChildren
-
hasChildren
public boolean hasChildren() -
getValue
-
setValue
-
getParent
-
getName
-
isRoot
public boolean isRoot() -
setObject
-
getObject
public <T> T getObject() -
getObject
Returns this node's object cast to the given class.- Type Parameters:
T- the type to cast to.- Parameters:
clazz- the class to cast this node's object to.- Returns:
- this node's object.
- Since:
- 2.1
-
isInstanceOf
Determines if this node's object is an instance of the given class.- Parameters:
clazz- the class to check.- Returns:
trueif this node's object is an instance of the given class.- Since:
- 2.1
-
getType
-
toString
-