Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
All
-
Patch
Description
Sometimes you have to process all the child nodes, before you can construct the
target node for the markup element. Right now, builder support requires this construction
within the createNode method, and once constructed this node is immutable.
What is proposed is either modify nodeCompleted to return an Object or to
add a new method executed after nodeCompleted that allows the
sub-class to assign a new node to represent the markup element.
The issue is that nodeCompleted is currently used in sub-class'd builders so a change
to it's method signature would have an impact on these builders.
So what is recommended is to add a new method right after nodeCompleted called
postProcessNode and its method signature would be:
protected Object postNodeCompleted (Object parent, Object node)
the default implementation would be:
protected Object postNodeCompletion( parent, Object node) {
return node;
}
The nodeCompleted method should be deprecated, with reference to the new method, postNodeCompletion.
eventually nodeCompleted signature can be changed to match postNodeCompletion.