| java.lang.Object com.google.gwt.dev.jdt.AbstractCompiler com.google.gwt.dev.jdt.ByteCodeCompiler
ByteCodeCompiler | public class ByteCodeCompiler extends AbstractCompiler (Code) | | A facade around the JDT compiler to manage on-demand Java source to bytecode
compilation, caching compiled bytecode where possible.
|
Constructor Summary | |
public | ByteCodeCompiler(SourceOracle sourceOracle) Creates a bytecode compiler for use not in hosted mode. | public | ByteCodeCompiler(SourceOracle sourceOracle, CacheManager cacheManager) Creates a byte code compiler given the supplied sourceOracle (to find the
source) and the supplied cacheManager (to keep the bytecode and other
info). |
ByteCodeCompiler | public ByteCodeCompiler(SourceOracle sourceOracle)(Code) | | Creates a bytecode compiler for use not in hosted mode. All bytecode will
be thrown away after reload.
Parameters: sourceOracle - used to find the source |
ByteCodeCompiler | public ByteCodeCompiler(SourceOracle sourceOracle, CacheManager cacheManager)(Code) | | Creates a byte code compiler given the supplied sourceOracle (to find the
source) and the supplied cacheManager (to keep the bytecode and other
info). If the cacheManager has a cacheDir, it will keep bytecode across
reload, and load them from the cacheDir on startup. Otherwise, each reload
will clear the cache. In hosted mode, the cacheManager used to create this
object should be the same one used to create the typeOracleBuilder.
Parameters: sourceOracle - used to find the source Parameters: cacheManager - used to keep the cached information |
doAcceptResult | protected void doAcceptResult(CompilationResult result)(Code) | | |
doGetByteCodeFromCache | protected ByteCode doGetByteCodeFromCache(TreeLogger logger, String binaryTypeName)(Code) | | Checks the cache for bytecode for the specified binary type name. Silently
removes and pretends it didn't see any bytecode that is out-of-date with
respect to the compilation unit that provides it.
|
putClassBytes | public void putClassBytes(TreeLogger logger, String binaryTypeName, byte[] bytes, String location)(Code) | | Prevents the compile process from ever trying to compile these types from
source. This is used for special types that would not compile correctly
from source.
Parameters: binaryTypeName - the binary name of the specified type |
removeStaleByteCode | public void removeStaleByteCode(TreeLogger logger)(Code) | | This method removes the bytecode which is no longer current, or if the
cacheManager does not have a cacheDir, all the bytecode.
Parameters: logger - used to describe the results to the user |
|
|