Package com.google.javascript.jscomp

# Interface CompilerOptions.AliasTransformationHandler

Enclosing class:
  `CompilerOptions`

public static interface CompilerOptions.AliasTransformationHandler
A Role Specific Interface for JS Compiler that represents a data holder object which is used to store goog.scope alias code changes to code made during a compile. There is no guarantee that individual alias changes are invoked in the order they occur during compilation, so implementations should not assume any relevance to the order changes arrive.

Calls to the mutators are expected to resolve very quickly, so implementations should not perform expensive operations in the mutator methods.

## Method Summary

Modifier and Type
Method
Description
`CompilerOptions.AliasTransformation`
`logAliasTransformation(String sourceFile, SourcePosition<CompilerOptions.AliasTransformation> position)`
Builds an AliasTransformation implementation and returns it to the caller.

## Method Details

### logAliasTransformation

CompilerOptions.AliasTransformation logAliasTransformation(String sourceFile, SourcePosition<CompilerOptions.AliasTransformation> position)
Builds an AliasTransformation implementation and returns it to the caller.

Callers are allowed to request multiple AliasTransformation instances for the same file, though it is expected that the first and last char values for multiple instances will not overlap.

This method is expected to have a side-effect of storing off the created AliasTransformation, which guarantees that invokers of this interface cannot leak AliasTransformation to this implementation that the implementor did not create

Parameters:
  `sourceFile` - the source file the aliases re contained in.
  `position` - the region of the source file associated with the goog.scope call. The item of the SourcePosition is the returned AliasTransformation