public class CompilerEnvirons
extends java.lang.Object
Constructor and Description |
---|
CompilerEnvirons() |
Modifier and Type | Method and Description |
---|---|
ErrorReporter |
getErrorReporter() |
int |
getLanguageVersion() |
int |
getOptimizationLevel() |
void |
initFromContext(Context cx) |
boolean |
isAllowMemberExprAsFunctionName() |
boolean |
isGenerateDebugInfo() |
boolean |
isGenerateObserverCount() |
boolean |
isGeneratingSource() |
boolean |
isReservedKeywordAsIdentifier() |
boolean |
isStrictMode() |
boolean |
isUseDynamicScope() |
boolean |
isXmlAvailable() |
boolean |
reportWarningAsError() |
void |
setAllowMemberExprAsFunctionName(boolean flag) |
void |
setErrorReporter(ErrorReporter errorReporter) |
void |
setGenerateDebugInfo(boolean flag) |
void |
setGenerateObserverCount(boolean generateObserverCount)
Turn on or off generation of code with callbacks to
track the count of executed instructions.
|
void |
setGeneratingSource(boolean generatingSource)
Specify whether or not source information should be generated.
|
void |
setLanguageVersion(int languageVersion) |
void |
setOptimizationLevel(int level) |
void |
setReservedKeywordAsIdentifier(boolean flag) |
void |
setXmlAvailable(boolean flag) |
public void initFromContext(Context cx)
public final ErrorReporter getErrorReporter()
public void setErrorReporter(ErrorReporter errorReporter)
public final int getLanguageVersion()
public void setLanguageVersion(int languageVersion)
public final boolean isGenerateDebugInfo()
public void setGenerateDebugInfo(boolean flag)
public final boolean isUseDynamicScope()
public final boolean isReservedKeywordAsIdentifier()
public void setReservedKeywordAsIdentifier(boolean flag)
public final boolean isAllowMemberExprAsFunctionName()
public void setAllowMemberExprAsFunctionName(boolean flag)
public final boolean isXmlAvailable()
public void setXmlAvailable(boolean flag)
public final int getOptimizationLevel()
public void setOptimizationLevel(int level)
public final boolean isGeneratingSource()
public final boolean isStrictMode()
public final boolean reportWarningAsError()
public void setGeneratingSource(boolean generatingSource)
Without source information, evaluating the "toString" method on JavaScript functions produces only "[native code]" for the body of the function. Note that code generated without source is not fully ECMA conformant.
public boolean isGenerateObserverCount()
public void setGenerateObserverCount(boolean generateObserverCount)
generateObserverCount
- if true, generated code will contain
calls to accumulate an estimate of the instructions executed.