Package org.dojotoolkit.shrinksafe

# Class TokenMapper

java.lang.Object
org.dojotoolkit.shrinksafe.TokenMapper

public class TokenMapper extends Object

## Constructor Summary

Constructors
Constructor
Description
`TokenMapper(org.mozilla.javascript.ast.ScriptNode parseTree)`

## Method Summary

Modifier and Type
Method
Description
`void`
`enterNestingLevel(int braceNesting)`
`Map`
`getCurrentTokens()`
`DebugData`
`getDebugData(Integer functionPosition)`
`void`
`incrementFunctionNumber()`
`boolean`
`leaveNestingLevel(int braceNesting)`
`void`
`reset()`
`int`
`sourceCompress(String encodedSource, int offset, boolean asQuotedString, StringBuffer sb, int prevToken, boolean inArgsList, int currentLevel, ReplacedTokens replacedTokens)`
Compress the script

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### TokenMapper

public TokenMapper(org.mozilla.javascript.ast.ScriptNode parseTree)

## Method Details

### incrementFunctionNumber

public void incrementFunctionNumber()

### sourceCompress

public int sourceCompress(String encodedSource, int offset, boolean asQuotedString, StringBuffer sb, int prevToken, boolean inArgsList, int currentLevel, ReplacedTokens replacedTokens)
Compress the script

Parameters:
  `encodedSource` - encoded source string
  `offset` - position within the encoded source
  `asQuotedString` - boolean value indicating a quoted string
  `sb` - String buffer reference
  `prevToken` - Previous token in encoded source
  `inArgsList` - boolean value indicating position inside arguments list
  `currentLevel` - embeded function level
  `parseTree` - Mapping of each function node and corresponding parameters invalid input: '&' variables names
Returns:
  compressed script

### enterNestingLevel

public void enterNestingLevel(int braceNesting)

### leaveNestingLevel

public boolean leaveNestingLevel(int braceNesting)

### getCurrentTokens

public Map getCurrentTokens()

### getDebugData

public DebugData getDebugData(Integer functionPosition)

### reset

public void reset()