
public class ResourceOracleImpl extends AbstractResourceOracle
ResourceOracle.| Constructor and Description |
|---|
ResourceOracleImpl(List<ClassPathEntry> classPathEntries)
Constructs a
ResourceOracleImpl from a set of
ClassPathEntries. |
ResourceOracleImpl(TreeLogger logger)
Constructs a
ResourceOracleImpl from the thread's default
ClassLoader. |
ResourceOracleImpl(TreeLogger logger,
ResourceLoader resources) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Frees up all existing resources and transient internal state.
|
static void |
clearCache() |
static ClassPathEntry |
createEntryForUrl(TreeLogger logger,
URL url) |
Set<String> |
getPathNames()
Returns an unmodifiable set of unique abstract path names with constant
lookup time.
|
PathPrefixSet |
getPathPrefixes() |
Resource |
getResource(String pathName)
Returns the resource for the given path name or null if there is no such resource.
|
Set<Resource> |
getResources()
Returns an unmodifiable set of unique resources with constant lookup time.
|
com.google.gwt.thirdparty.guava.common.collect.SetMultimap<String,String> |
getSourceModulesByTypeSourceName()
Returns a mapping from resource paths to the set of names of modules that created PathPrefixes
(usually because of a
|
static void |
preload(TreeLogger logger)
Preinitializes the classpath from the thread default
ClassLoader. |
static void |
preload(TreeLogger logger,
ResourceLoader resources)
Preinitializes the classpath for a given
ResourceLoader. |
void |
scanResources(TreeLogger logger)
Scans the associated paths to recompute the available resources.
|
void |
setPathPrefixes(PathPrefixSet pathPrefixSet) |
getResourceAsStreampublic ResourceOracleImpl(List<ClassPathEntry> classPathEntries)
ResourceOracleImpl from a set of
ClassPathEntries. The list is held by reference and
must not be modified.public ResourceOracleImpl(TreeLogger logger)
ResourceOracleImpl from the thread's default
ClassLoader.public ResourceOracleImpl(TreeLogger logger, ResourceLoader resources)
public static void clearCache()
public static ClassPathEntry createEntryForUrl(TreeLogger logger, URL url) throws URISyntaxException, IOException
URISyntaxExceptionIOExceptionpublic static void preload(TreeLogger logger)
ClassLoader.public static void preload(TreeLogger logger, ResourceLoader resources)
ResourceLoader.public com.google.gwt.thirdparty.guava.common.collect.SetMultimap<String,String> getSourceModulesByTypeSourceName()
For example com/google/gwt/user/client/DOM.java was made live by the com.google.gwt.user.User module.
public void scanResources(TreeLogger logger)
logger - status and error details are written herepublic void clear()
ResourceOraclepublic Set<String> getPathNames()
ResourceOraclepublic PathPrefixSet getPathPrefixes()
public Set<Resource> getResources()
ResourceOraclepublic void setPathPrefixes(PathPrefixSet pathPrefixSet)
public Resource getResource(String pathName)
ResourceOracleCopyright © 2018. All rights reserved.