private CacheEntry toCacheEntry ( final StackTraceElement stackTraceElement , final Class < ? > callerClass , final boolean exact ) { String location = "?" ; String version = "?" ; ClassLoader lastLoader = null ; if ( callerClass != null ) { try { Bundle bundle = FrameworkUtil . getBundle ( callerClass ) ; if ( bundle != null ) { location = bundle . getBundleId ( ) + ":" + bundle . getSymbolicName ( ) ; version = bundle . getVersion ( ) . toString ( ) ; } } catch ( final Exception ex ) { // Ignore the exception. } lastLoader = callerClass . getClassLoader ( ) ; } return new CacheEntry ( new ExtendedClassInfo ( exact , location , version ) , lastLoader ) ; }
Construct the CacheEntry from the Class s information .