< prev index next >

src/jdk/nashorn/internal/runtime/StoredScript.java

Print this page
rev 1358 : 8067636: ant javadoc target is broken
Reviewed-by: hannesw, lagergren


  41     /** Main class name. */
  42     private final String mainClassName;
  43 
  44     /** Map of class names to class bytes. */
  45     private final Map<String, byte[]> classBytes;
  46 
  47     /** Constants array. */
  48     private final Object[] constants;
  49 
  50     /** Function initializers */
  51     private final Map<Integer, FunctionInitializer> initializers;
  52 
  53     private static final long serialVersionUID = 2958227232195298340L;
  54 
  55     /**
  56      * Constructor.
  57      *
  58      * @param compilationId compilation id
  59      * @param mainClassName main class name
  60      * @param classBytes map of class names to class bytes
  61      * @param initializers initializer map, id -> FunctionInitializer
  62      * @param constants constants array
  63      */
  64     public StoredScript(final int compilationId, final String mainClassName, final Map<String, byte[]> classBytes, final Map<Integer, FunctionInitializer> initializers, final Object[] constants) {
  65         this.compilationId = compilationId;
  66         this.mainClassName = mainClassName;
  67         this.classBytes = classBytes;
  68         this.constants = constants;
  69         this.initializers = initializers;
  70     }
  71 
  72     /**
  73      * Get the compilation id for this StoredScript
  74      * @return compilation id
  75      */
  76     public int getCompilationId() {
  77         return compilationId;
  78     }
  79 
  80     private Map<String, Class<?>> installClasses(final Source source, final CodeInstaller<ScriptEnvironment> installer) {
  81         final Map<String, Class<?>> installedClasses = new HashMap<>();




  41     /** Main class name. */
  42     private final String mainClassName;
  43 
  44     /** Map of class names to class bytes. */
  45     private final Map<String, byte[]> classBytes;
  46 
  47     /** Constants array. */
  48     private final Object[] constants;
  49 
  50     /** Function initializers */
  51     private final Map<Integer, FunctionInitializer> initializers;
  52 
  53     private static final long serialVersionUID = 2958227232195298340L;
  54 
  55     /**
  56      * Constructor.
  57      *
  58      * @param compilationId compilation id
  59      * @param mainClassName main class name
  60      * @param classBytes map of class names to class bytes
  61      * @param initializers initializer map, id -&gt; FunctionInitializer
  62      * @param constants constants array
  63      */
  64     public StoredScript(final int compilationId, final String mainClassName, final Map<String, byte[]> classBytes, final Map<Integer, FunctionInitializer> initializers, final Object[] constants) {
  65         this.compilationId = compilationId;
  66         this.mainClassName = mainClassName;
  67         this.classBytes = classBytes;
  68         this.constants = constants;
  69         this.initializers = initializers;
  70     }
  71 
  72     /**
  73      * Get the compilation id for this StoredScript
  74      * @return compilation id
  75      */
  76     public int getCompilationId() {
  77         return compilationId;
  78     }
  79 
  80     private Map<String, Class<?>> installClasses(final Source source, final CodeInstaller<ScriptEnvironment> installer) {
  81         final Map<String, Class<?>> installedClasses = new HashMap<>();


< prev index next >