Class SecureCompiler
- java.lang.Object
-
- com.google.javascript.jscomp.jsonml.SecureCompiler
-
public class SecureCompiler extends java.lang.ObjectCompilation 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classSecureCompiler.Report
-
Constructor Summary
Constructors Constructor Description SecureCompiler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcompile(JsonML source)voidenableFoldConstant()JsonMLgetJsonML()Returns compiled source in JsonML format.SecureCompiler.ReportgetReport()Returns report from the last compilation.java.lang.StringgetString()Returns compiled source as a JavaScript.
-
-
-
Method Detail
-
getJsonML
public JsonML getJsonML()
Returns compiled source in JsonML format.
-
getString
public java.lang.String getString()
Returns compiled source as a JavaScript.
-
getReport
public SecureCompiler.Report getReport()
Returns report from the last compilation.
-
compile
public void compile(JsonML source)
-
enableFoldConstant
public void enableFoldConstant()
-
-