private void guessExceptions ( ) { List < Class < ? > > tmpExceptionList = new ArrayList <> ( ) ; for ( Class < ? > c : supportedInterfaces ) { Method [ ] methods = c . getDeclaredMethods ( ) ; for ( Method m : methods ) { for ( Class < ? > exc : m . getExceptionTypes ( ) ) { if ( ! tmpExceptionList . contains ( exc ) ) tmpExceptionList . add ( exc ) ; } } } declaredExceptions = new Class [ tmpExceptionList . size ( ) ] ; tmpExceptionList . toArray ( declaredExceptions ) ; }
Looks up all possible exceptions .