You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Mikael Ståldal <mi...@magine.com> on 2016/08/21 11:30:52 UTC

Component vs. Node

Why does the ConfigurationBuilder uses its own Component class rather than
Node? They looks very similar to me.

Re: Component vs. Node

Posted by Ralph Goers <ra...@dslextreme.com>.
> On Aug 21, 2016, at 4:30 AM, Mikael Ståldal <mi...@magine.com> wrote:
> 
> Why does the ConfigurationBuilder uses its own Component class rather than Node? They looks very similar to me.
> 
Yes, they are very similar. But you will notice that the Node has a reference to its constructed Object, its concrete pluginType, and most importantly, its parent. When a node is constructed its parent node already exists. That is not true with components. They are created from the bottom of the tree to the top in the build method, while Nodes are created from the root node down.

Ralph