UNPKG

raptor

Version:

RaptorJS provides an AMD module loader that works in Node, Rhino and the web browser. It also includes various sub-modules to support building optimized web applications.

25 lines (21 loc) 909 B
define.Class( 'raptor/resources/RhinoSearchPathEntryAdapter', 'raptor/resources/SearchPathEntry', function(require, exports, module) { "use strict"; var RhinoResourceAdapter = require('raptor/resources/RhinoResourceAdapter'); var RhinoSearchPathEntryAdapter = function(javaSearchPathEntry) { RhinoSearchPathEntryAdapter.superclass.constructor.call(this); this.javaSearchPathEntry = javaSearchPathEntry; }; RhinoSearchPathEntryAdapter.prototype = { findResource: function(path) { var javaResource = this.javaSearchPathEntry.findResource(path); if (javaResource) { return new RhinoResourceAdapter(javaResource); } return null; } }; return RhinoSearchPathEntryAdapter; });