static Class getMostDerivedInterface ( Class controlIntf ) { while ( controlIntf . isAnnotationPresent ( ControlExtension . class ) ) { Class [ ] intfs = controlIntf . getInterfaces ( ) ; boolean found = false ; for ( int i = 0 ; i < intfs . length ; i ++ ) { if ( intfs [ i ] . isAnnotationPresent ( ControlExtension . class ) || intfs [ i ] . isAnnotationPresent ( ControlInterface . class ) ) { controlIntf = intfs [ i ] ; found = true ; break ; } } if ( ! found ) { throw new ControlException ( "Can't find base control interface for " + controlIntf ) ; } } return controlIntf ; }
Computes the most derived ControlInterface for the specified ControlExtension .