private boolean isInstanceOf ( Object rd , List < Class < ? > > interfaces ) { boolean result = false ; for ( Class < ? > class1 : interfaces ) { if ( class1 . isInstance ( rd ) ) { result = true ; break ; } } return result ; }
Checks if an object is an instance of on interface from a list of interface