
org.mozilla.javascript.commonjs.module.ModuleScript Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rhino Show documentation
Show all versions of rhino Show documentation
A version of the Rhino Javascript engine pulled diretly from the Mozialla repos.
The newest version!
package org.mozilla.javascript.commonjs.module;
import java.io.Serializable;
import org.mozilla.javascript.Script;
import org.mozilla.javascript.commonjs.module.ModuleScript;
/**
* Represents a compiled CommonJS module script. The {@link Require} functions
* use them and obtain them through a {@link ModuleScriptProvider}. Instances
* are immutable.
* @author Attila Szegedi
* @version $Id: ModuleScript.java,v 1.1 2010/02/15 19:31:14 szegedia%freemail.hu Exp $
*/
public class ModuleScript implements Serializable
{
private static final long serialVersionUID = 1L;
private final Script script;
private final String uri;
/**
* Creates a new CommonJS module.
* @param script the script representing the code of the module.
* @param uri the URI of the module.
*/
public ModuleScript(Script script, String uri) {
this.script = script;
this.uri = uri;
}
/**
* Returns the script object representing the code of the module.
* @return the script object representing the code of the module.
*/
public Script getScript(){
return script;
}
/**
* Returns the URI of the module.
* @return the URI of the module.
*/
public String getUri() {
return uri;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy