private void fillNodesInContext(SiteNode rootNode,List<SiteNode> nodesList,Context context){
  @SuppressWarnings("unchecked") Enumeration<SiteNode> en=rootNode.children();
  while (en.hasMoreElements()) {
    SiteNode sn=en.nextElement();
    if (context.isInContext(sn))     nodesList.add(sn);
    fillNodesInContext(sn,nodesList,context);
  }
}

private void fillNodesInContext ( SiteNode rootNode , List < SiteNode > nodesList , Context context ) { @ SuppressWarnings ( "unchecked" ) Enumeration < SiteNode > en = rootNode . children ( ) ; while ( en . hasMoreElements ( ) ) { SiteNode sn = en . nextElement ( ) ; if ( context . isInContext ( sn ) ) nodesList . add ( sn ) ; fillNodesInContext ( sn , nodesList , context ) ; } }
fills a given list with nodes in context , searching recursively .
