| java.lang.Object com.google.gwt.dev.jdt.CacheManager
CacheManager | public class CacheManager (Code) | | CacheManager manages all the caching used to speed up hosted mode startup and
refresh, and manages the invalidations required to ensure that changes are
reflected correctly on reload.
|
Inner Class :static class Mapper | |
Field Summary | |
final public static Class>[] | BOOTSTRAP_CLASSES The set of all classes whose bytecode needs to exist as bootstrap bytecode
to be taken as given by the bytecode compiler. |
Method Summary | |
boolean | acceptIntoCache(TreeLogger logger, String binaryTypeName, ByteCode byteCode) This method adds byte. | void | addCompilationUnit(CompilationUnitProvider cup) Adds this compilation unit if it is not present, or is older. | void | addDependentsToChangedFiles() This method modifies the field changedFiles to contain all
of the additional files that are capable of reaching any of the files
currently contained within changedFiles . | public void | addGeneratedCup(CompilationUnitProvider generatedCup) Adds the specified
CompilationUnitProvider to the set of CUPs
generated by
com.google.gwt.core.ext.Generator Generator s. | public void | addGeneratedResource(String partialPath) | ICompilationUnit | findUnitForCup(CompilationUnitProvider cup) | Set<CompilationUnitProvider> | getAddedCups() | AstCompiler | getAstCompiler() | ByteCode | getByteCode(String binaryTypeName) Gets the bytecode from the cache, rejecting it if an incompatible change
occurred since it was cached. | Set<String> | getChangedFiles() | Map<String, CompilationUnitDeclaration> | getCudsByFileName() | CompilationUnitProvider | getCup(CompilationUnitProvider cup) | Object | getCupLastUpdateTime(CompilationUnitProvider cup) | Map<String, CompilationUnitProvider> | getCupsByLocation() | Mapper | getIdentityMapper() | Map<String, Long> | getTimesByLocation() | JType | getTypeForBinding(ReferenceBinding referenceBinding) | public TypeOracle | getTypeOracle() This method returns the TypeOracle associated with this
CacheManager . | public boolean | hasGeneratedResource(String partialPath) | void | invalidateOnRefresh(TypeOracle typeOracle) This removes all state changed since the last time the typeOracle was run. | public void | invalidateVolatileFiles() Ensures that all compilation units generated via generators are removed
from the system so that they will be generated again, and thereby take into
account input that may have changed since the last reload. | boolean | isCupUnchanged(CompilationUnitProvider cup, Long lastModified) | void | markCupChanged(CompilationUnitProvider cup) This method is called when a cup is known to have changed. | boolean | removeFromCache(TreeLogger logger, String binaryTypeName) | void | removeStaleByteCode(TreeLogger logger, AbstractCompiler compiler) This method removes all of the bytecode which is out of date from the
bytecode cache. | void | setTypeForBinding(ReferenceBinding binding, JClassType type) |
BOOTSTRAP_CLASSES | final public static Class>[] BOOTSTRAP_CLASSES(Code) | | The set of all classes whose bytecode needs to exist as bootstrap bytecode
to be taken as given by the bytecode compiler.
|
CacheManager | public CacheManager()(Code) | | Creates a new CacheManager , creating a new
TypeOracle . This constructor does not specify a cache
directory, and therefore is to be used in unit tests and executables that
do not need caching.
|
CacheManager | public CacheManager(String cacheDir, TypeOracle oracle)(Code) | | Creates a new CacheManager , creating a new
TypeOracle . This constructor uses the specified cacheDir,
and does cache information across reloads. If the specified cacheDir is
null, caching across reloads will be disabled.
|
CacheManager | public CacheManager(TypeOracle typeOracle)(Code) | | Creates a new CacheManager , using the supplied
TypeOracle . This constructor does not specify a cache
directory, and therefore is to be used in unit tests and executables that
do not need caching.
|
acceptIntoCache | boolean acceptIntoCache(TreeLogger logger, String binaryTypeName, ByteCode byteCode)(Code) | | This method adds byte.
Parameters: logger - Parameters: binaryTypeName - Parameters: byteCode - |
addDependentsToChangedFiles | void addDependentsToChangedFiles()(Code) | | This method modifies the field changedFiles to contain all
of the additional files that are capable of reaching any of the files
currently contained within changedFiles .
|
addGeneratedResource | public void addGeneratedResource(String partialPath)(Code) | | |
getByteCode | ByteCode getByteCode(String binaryTypeName)(Code) | | Gets the bytecode from the cache, rejecting it if an incompatible change
occurred since it was cached.
|
getCudsByFileName | Map<String, CompilationUnitDeclaration> getCudsByFileName()(Code) | | |
getIdentityMapper | Mapper getIdentityMapper()(Code) | | |
getTypeForBinding | JType getTypeForBinding(ReferenceBinding referenceBinding)(Code) | | |
getTypeOracle | public TypeOracle getTypeOracle()(Code) | | This method returns the TypeOracle associated with this
CacheManager .
|
hasGeneratedResource | public boolean hasGeneratedResource(String partialPath)(Code) | | |
invalidateOnRefresh | void invalidateOnRefresh(TypeOracle typeOracle)(Code) | | This removes all state changed since the last time the typeOracle was run.
Since the typeOracle information is not cached on disk, this is not needed
the first time.
Parameters: typeOracle - |
invalidateVolatileFiles | public void invalidateVolatileFiles()(Code) | | Ensures that all compilation units generated via generators are removed
from the system so that they will be generated again, and thereby take into
account input that may have changed since the last reload.
|
isCupUnchanged | boolean isCupUnchanged(CompilationUnitProvider cup, Long lastModified)(Code) | | Was this cup, last modified at time lastModified modified since it was last
processed by the system?
|
markCupChanged | void markCupChanged(CompilationUnitProvider cup)(Code) | | This method is called when a cup is known to have changed. This will ensure
that all the types defined in this cup are invalidated.
Parameters: cup - the cup modified |
removeStaleByteCode | void removeStaleByteCode(TreeLogger logger, AbstractCompiler compiler)(Code) | | This method removes all of the bytecode which is out of date from the
bytecode cache. The set of files needing to be changed are going to be the
set already known to be changed plus those that are out of date in the
bytecode cache.
|
setTypeForBinding | void setTypeForBinding(ReferenceBinding binding, JClassType type)(Code) | | |
|
|