@ SuppressWarnings ( "unchecked" ) public < T extends ElementBase > T findChildElement ( Class < T > clazz ) { for ( ElementBase child : getChildren ( ) ) { if ( clazz . isInstance ( child ) ) { return ( T ) child ; } } for ( ElementBase child : getChildren ( ) ) { T child2 = child . findChildElement ( clazz ) ; if ( child2 != null ) { return child2 ; } } return null ; }
Recurses the component subtree for a child belonging to the specified class .