private boolean extendsServiceClient ( DetailAST packageDefinitionToken ) { String packageName = FullIdent . createFullIdent ( packageDefinitionToken . findFirstToken ( TokenTypes . DOT ) ) . getText ( ) ; if ( packageName . startsWith ( "com.microsoft" ) ) { return false ; } DetailAST classDefinitionToken = packageDefinitionToken . findFirstToken ( TokenTypes . CLASS_DEF ) ; if ( classDefinitionToken == null ) { return false ; } String className = classDefinitionToken . findFirstToken ( TokenTypes . IDENT ) . getText ( ) ; try { Class < ? > clazz = Class . forName ( packageName + "." + className ) ; return this . serviceClientClass . isAssignableFrom ( clazz ) ; } catch ( ClassNotFoundException ex ) { log ( classDefinitionToken , String . format ( FAILED_TO_LOAD_MESSAGE , className ) ) ; return false ; } }
Determines if the class extends ServiceClient .