Class SecureCompiler


  • public class SecureCompiler
    extends java.lang.Object
    Compilation of JavaScript code which guarantees that all security capabilities are preserved after the process. In particular, it can be safely applied to cajoled source. JS Compiler is used for code analysis and optimization. It runs a series of passes which try to improve the code. For safety reasons, only a subset of local passes, which are provided by JS Compiler, are processed. Currently it includes: - elimination of temporary variables Using SecureCompiler is quite straightforward. A user just needs to create a new instance and call compile() method. Currently the only input which is supported is JsonML.
    • Constructor Detail

      • SecureCompiler

        public SecureCompiler()
    • Method Detail

      • getJsonML

        public JsonML getJsonML()
        Returns compiled source in JsonML format.
      • getString

        public java.lang.String getString()
        Returns compiled source as a JavaScript.
      • compile

        public void compile​(JsonML source)
      • enableFoldConstant

        public void enableFoldConstant()