Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Method

Description

Map getContext()

returns the context of the current node*

Map getParentContext()

returns the context of the parent of the current node**

Factory getCurrentFactory()

returns the factory that built the current node

Factory getParentFactory()

returns the factory of the parent of the current node (if any)

Object getParentNode()

returns the parent of the current node (if any)**

Object getCurrent()

returns the current node*

* Note: In the newInstance(...) method, since the "current" node has not yet been created, getCurrent() and getContext() will return the parent node or parent context of the node that is currently being constructed.

** Note: In the newInstance(...) method, since the "current" node has not yet been created, getParentNode() and getParentContext() will return the grandparent node or grandparent context of the node that is currently being constructed.

The builder is marked as abstract so you are required to create a subclass for your own builders, despite that it doesn't enforce the implementation of any method at all. There are a couple of protected methods though, that when overwritten will give you more control over the builder's internal workings:

...