org.dojotoolkit.shrinksafe
Class TokenMapper
java.lang.Object
org.dojotoolkit.shrinksafe.TokenMapper
public class TokenMapper
- extends java.lang.Object
Constructor Summary |
TokenMapper(org.mozilla.javascript.ScriptOrFnNode parseTree)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TokenMapper
public TokenMapper(org.mozilla.javascript.ScriptOrFnNode parseTree)
incrementFunctionNumber
public void incrementFunctionNumber()
sourceCompress
public int sourceCompress(java.lang.String encodedSource,
int offset,
boolean asQuotedString,
java.lang.StringBuffer sb,
int prevToken,
boolean inArgsList,
int currentLevel,
ReplacedTokens replacedTokens)
- Compress the script
- Parameters:
encodedSource
- encoded source stringoffset
- position within the encoded sourceasQuotedString
- boolean value indicating a quoted stringsb
- String buffer referenceprevToken
- Previous token in encoded sourceinArgsList
- boolean value indicating position inside arguments listcurrentLevel
- embeded function levelparseTree
- Mapping of each function node and corresponding parameters &
variables names
- Returns:
- compressed script
enterNestingLevel
public void enterNestingLevel(int braceNesting)
leaveNestingLevel
public boolean leaveNestingLevel(int braceNesting)
getCurrentTokens
public java.util.Map getCurrentTokens()
getDebugData
public DebugData getDebugData(java.lang.Integer functionPosition)
reset
public void reset()
Copyright © 2011 SOFTEC sa. All Rights Reserved.