public static void t ( Class < ? > clz ) { // Must be non null and type of interest. if ( clz == null || ClassesCache . check ( clz ) || Types . isIgnorable ( clz ) ) { return ; } // Check and assign id to this class (this must be synchronized). try { sLock . lock ( ) ; if ( ! sClasses . add ( clz ) ) { return ; } } finally { sLock . unlock ( ) ; } String className = clz . getName ( ) ; String resourceName = className . substring ( className . lastIndexOf ( "." ) + 1 ) . concat ( ".class" ) ; URL url = null ; try { // Find resource for the class (URL that we will use to extract // the path). url = clz . getResource ( resourceName ) ; } catch ( SecurityException ex ) { Log . w ( "Unable to obtain resource because of security reasons." ) ; } // If no URL obtained, return. if ( url == null ) { return ; } recordURL ( url . toExternalForm ( ) ) ; }
Touch method . Instrumented code invokes this method to collect class coverage .