private static boolean findPropsFromNodeBean ( final NodeBean nodeBean , final String [ ] pathList , final int idx , final List < Props > propsList ) { if ( idx < pathList . length && nodeBean . getName ( ) . equals ( pathList [ idx ] ) ) { if ( idx == pathList . length - 1 ) { propsList . add ( nodeBean . getProps ( ) ) ; return true ; } for ( final NodeBean bean : nodeBean . getNodes ( ) ) { if ( findPropsFromNodeBean ( bean , pathList , idx + 1 , propsList ) ) { return true ; } } } return false ; }
Helper method to recursively find props from node bean .