public void overlay ( DepTreeNode node ) { if ( node . defineDependencies != null || node . requireDependencies != null ) { setDependencies ( node . defineDependencies , node . requireDependencies , node . dependentFeatures , node . lastModified ( ) , node . lastModifiedDep ( ) ) ; } node . uri = uri ; if ( node . getChildren ( ) == null ) { return ; } for ( Map . Entry < String , DepTreeNode > entry : node . getChildren ( ) . entrySet ( ) ) { DepTreeNode existing = getChild ( entry . getKey ( ) ) ; if ( existing == null ) { add ( entry . getValue ( ) ) ; } else { existing . overlay ( entry . getValue ( ) ) ; } } }
Overlay the specified node and its descendants over this node . The specified node will be merged with this node with the dependencies of any nodes from the specified node replacing the dependencies of the corresponding node in this node s tree .