src/aria/core/Cache.js
function (classpath) {
            var basePath = Aria.getLogicalPath(classpath);
            for (var i = 0, l = atExtensions.length; i < l; i++) {
                try {
                    var logicalPath = basePath + atExtensions[i];
                    var cacheItem = require.cache[require.resolve(logicalPath)];
                    if (cacheItem) {
                        return logicalPath;
                    }
                } catch (e) {
                    // require.resolve can throw an exception in node.js if the file does not exist
                    // simply try other extensions in that case
                }
            }
            // it may be the classpath of a resource (which would not appear in the require cache):
            var resMgr = aria.core.ResMgr;
            if (resMgr) {
                return resMgr.getResourceLogicalPath(basePath);
            }
        }
function (classpath) {
            var basePath = Aria.getLogicalPath(classpath);
            for (var i = 0, l = atExtensions.length; i < l; i++) {
                try {
                    var logicalPath = basePath + atExtensions[i];
                    var cacheItem = require.cache[require.resolve(logicalPath)];
                    if (cacheItem) {
                        return logicalPath;
                    }
                } catch (e) {
                    // require.resolve can throw an exception in node.js if the file does not exist
                    // simply try other extensions in that case
                }
            }
            // it may be the classpath of a resource (which would not appear in the require cache):
            var resMgr = aria.core.ResMgr;
            if (resMgr) {
                return resMgr.getResourceLogicalPath(basePath);
            }
        }
function ( classpath ) { var basePath = Aria . getLogicalPath ( classpath ) ; for ( var i = 0 , l = atExtensions . length ; i < l ; i ++ ) { try { var logicalPath = basePath + atExtensions [ i ] ; var cacheItem = require . cache [ require . resolve ( logicalPath ) ] ; if ( cacheItem ) { return logicalPath ; } } catch ( e ) { // require.resolve can throw an exception in node.js if the file does not exist // simply try other extensions in that case } } // it may be the classpath of a resource (which would not appear in the require cache): var resMgr = aria . core . ResMgr ; if ( resMgr ) { return resMgr . getResourceLogicalPath ( basePath ) ; } }
Get the logical filename from the classpath. Returns null if the classpath is not inside the cache.
@param {String} classpath e.g x.y.MyClass
@return {String} logical path e.g x/y/MyClass.tpl
Get the logical filename from the classpath . Returns null if the classpath is not inside the cache .