public final boolean hasInterface ( final SgClass intf ) { if ( intf == null ) { throw new IllegalArgumentException ( "The argument 'intf' cannot be null!" ) ; } if ( ! intf . isInterface ( ) ) { throw new IllegalArgumentException ( "The argument 'intf' is a class an not an interface!" ) ; } for ( int i = 0 ; i < interfaces . size ( ) ; i ++ ) { if ( interfaces . get ( i ) . equals ( intf ) ) { return true ; } } if ( superClass != null ) { return superClass . hasInterface ( intf ) ; } return false ; }
Checks if this class or any of it s super classes has a given interface .