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

Print this page




  74     /**
  75      * Permission needed to create Nashorn Context instance.
  76      */
  77     public static final String NASHORN_CREATE_CONTEXT  = "nashorn.createContext";
  78 
  79     /**
  80      * Permission needed to create Nashorn Global instance.
  81      */
  82     public static final String NASHORN_CREATE_GLOBAL   = "nashorn.createGlobal";
  83 
  84     /**
  85      * Permission to get current Nashorn Context from thread local storage.
  86      */
  87     public static final String NASHORN_GET_CONTEXT     = "nashorn.getContext";
  88 
  89     /**
  90      * Permission to use Java reflection/jsr292 from script code.
  91      */
  92     public static final String NASHORN_JAVA_REFLECTION = "nashorn.JavaReflection";
  93 





  94     // nashorn load psuedo URL prefixes
  95     private static final String LOAD_CLASSPATH = "classpath:";
  96     private static final String LOAD_FX = "fx:";
  97     private static final String LOAD_NASHORN = "nashorn:";
  98 
  99     /* Force DebuggerSupport to be loaded. */
 100     static {
 101         DebuggerSupport.FORCELOAD = true;
 102     }
 103 
 104     /**
 105      * ContextCodeInstaller that has the privilege of installing classes in the Context.
 106      * Can only be instantiated from inside the context and is opaque to other classes
 107      */
 108     public static class ContextCodeInstaller implements CodeInstaller<ScriptEnvironment> {
 109         private final Context      context;
 110         private final ScriptLoader loader;
 111         private final CodeSource   codeSource;
 112 
 113         private ContextCodeInstaller(final Context context, final ScriptLoader loader, final CodeSource codeSource) {




  74     /**
  75      * Permission needed to create Nashorn Context instance.
  76      */
  77     public static final String NASHORN_CREATE_CONTEXT  = "nashorn.createContext";
  78 
  79     /**
  80      * Permission needed to create Nashorn Global instance.
  81      */
  82     public static final String NASHORN_CREATE_GLOBAL   = "nashorn.createGlobal";
  83 
  84     /**
  85      * Permission to get current Nashorn Context from thread local storage.
  86      */
  87     public static final String NASHORN_GET_CONTEXT     = "nashorn.getContext";
  88 
  89     /**
  90      * Permission to use Java reflection/jsr292 from script code.
  91      */
  92     public static final String NASHORN_JAVA_REFLECTION = "nashorn.JavaReflection";
  93 
  94     /**
  95      * Permission to enable nashorn debug mode.
  96      */
  97     public static final String NASHORN_DEBUG_MODE = "nashorn.debugMode";
  98 
  99     // nashorn load psuedo URL prefixes
 100     private static final String LOAD_CLASSPATH = "classpath:";
 101     private static final String LOAD_FX = "fx:";
 102     private static final String LOAD_NASHORN = "nashorn:";
 103 
 104     /* Force DebuggerSupport to be loaded. */
 105     static {
 106         DebuggerSupport.FORCELOAD = true;
 107     }
 108 
 109     /**
 110      * ContextCodeInstaller that has the privilege of installing classes in the Context.
 111      * Can only be instantiated from inside the context and is opaque to other classes
 112      */
 113     public static class ContextCodeInstaller implements CodeInstaller<ScriptEnvironment> {
 114         private final Context      context;
 115         private final ScriptLoader loader;
 116         private final CodeSource   codeSource;
 117 
 118         private ContextCodeInstaller(final Context context, final ScriptLoader loader, final CodeSource codeSource) {