|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mozilla.javascript.CompilerEnvirons
public class CompilerEnvirons
Constructor Summary | |
---|---|
CompilerEnvirons()
|
Method Summary | |
---|---|
java.util.Set<java.lang.String> |
getActivationNames()
|
boolean |
getAllowSharpComments()
|
ErrorReporter |
getErrorReporter()
|
int |
getLanguageVersion()
|
int |
getOptimizationLevel()
|
boolean |
getWarnTrailingComma()
|
static CompilerEnvirons |
ideEnvirons()
Returns a CompilerEnvirons suitable for using Rhino
in an IDE environment. |
void |
initFromContext(Context cx)
|
boolean |
isAllowMemberExprAsFunctionName()
Extension to ECMA: if 'function <name>' is not followed by '(', assume <name> starts a memberExpr |
boolean |
isGenerateDebugInfo()
|
boolean |
isGenerateObserverCount()
|
boolean |
isGeneratingSource()
|
boolean |
isIdeMode()
|
boolean |
isRecordingComments()
|
boolean |
isRecordingLocalJsDocComments()
|
boolean |
isReservedKeywordAsIdentifier()
|
boolean |
isStrictMode()
|
boolean |
isXmlAvailable()
|
boolean |
recoverFromErrors()
|
boolean |
reportWarningAsError()
|
void |
setActivationNames(java.util.Set<java.lang.String> activationNames)
|
void |
setAllowMemberExprAsFunctionName(boolean flag)
|
void |
setAllowSharpComments(boolean allow)
Mozilla sources use the C preprocessor. |
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 |
setIdeMode(boolean ide)
Puts the parser in "IDE" mode. |
void |
setLanguageVersion(int languageVersion)
|
void |
setOptimizationLevel(int level)
|
void |
setRecordingComments(boolean record)
|
void |
setRecordingLocalJsDocComments(boolean record)
|
void |
setRecoverFromErrors(boolean recover)
Turn on or off full error recovery. |
void |
setReservedKeywordAsIdentifier(boolean flag)
|
void |
setStrictMode(boolean strict)
|
void |
setWarnTrailingComma(boolean warn)
|
void |
setXmlAvailable(boolean flag)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CompilerEnvirons()
Method Detail |
---|
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 isReservedKeywordAsIdentifier()
public void setReservedKeywordAsIdentifier(boolean flag)
public final boolean isAllowMemberExprAsFunctionName()
memberExpr
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 boolean getWarnTrailingComma()
public void setWarnTrailingComma(boolean warn)
public final boolean isStrictMode()
public void setStrictMode(boolean strict)
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.public boolean isRecordingComments()
public void setRecordingComments(boolean record)
public boolean isRecordingLocalJsDocComments()
public void setRecordingLocalJsDocComments(boolean record)
public void setRecoverFromErrors(boolean recover)
public boolean recoverFromErrors()
public void setIdeMode(boolean ide)
public boolean isIdeMode()
public java.util.Set<java.lang.String> getActivationNames()
public void setActivationNames(java.util.Set<java.lang.String> activationNames)
public void setAllowSharpComments(boolean allow)
public boolean getAllowSharpComments()
public static CompilerEnvirons ideEnvirons()
CompilerEnvirons
suitable for using Rhino
in an IDE environment. Most features are enabled by default.
The ErrorReporter
is set to an ErrorCollector
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |