public class ModuleDef extends Object implements DepsInfoProvider
Modifier and Type | Field and Description |
---|---|
protected ResourceOracleImpl |
lazyPublicOracle
All resources found on the public path, specified by
|
Constructor and Description |
---|
ModuleDef(String name) |
ModuleDef(String name,
ResourceLoader resources) |
ModuleDef(String name,
ResourceLoader resources,
boolean monolithic,
boolean mergePathPrefixes)
Constructs a ModuleDef.
|
Modifier and Type | Method and Description |
---|---|
void |
addEntryPointTypeName(String typeName) |
void |
addGwtXmlFile(File xmlFile) |
void |
addLinker(String name) |
void |
addPublicPackage(String publicPackage,
String[] includeList,
String[] excludeList,
String[] skipList,
boolean defaultExcludes,
boolean caseSensitive) |
void |
addResourcePath(String resourcePath) |
void |
addRule(Rule rule) |
void |
addSourcePackage(String sourcePackage,
String[] includeList,
String[] excludeList,
String[] skipList,
boolean defaultExcludes,
boolean caseSensitive) |
void |
addSourcePackageImpl(String sourcePackage,
String[] includeList,
String[] excludeList,
String[] skipList,
boolean defaultExcludes,
boolean caseSensitive,
boolean isSuperSource) |
void |
addSuperSourcePackage(String superSourcePackage,
String[] includeList,
String[] excludeList,
String[] skipList,
boolean defaultExcludes,
boolean caseSensitive) |
void |
clearEntryPoints() |
boolean |
deactivateLinker(String linkerName)
Deactivate a linker by name.
|
void |
defineLinker(TreeLogger logger,
String name,
Class<? extends Linker> linker)
Associate a Linker class with a symbolic name.
|
void |
enterModule(String canonicalModuleName)
Called as module tree parsing enters and exits individual module file of various types and so
provides the ModuleDef with an opportunity to keep track of what context it is currently
operating.
|
void |
exitModule() |
Resource |
findPublicFile(String partialPath) |
String |
findServletForPath(String actual) |
Resource |
findSourceFile(String partialPath)
Returns the Resource for a source file if it is found;
null
otherwise. |
Set<String> |
getActiveLinkerNames() |
Set<Class<? extends Linker>> |
getActiveLinkers() |
Class<? extends Linker> |
getActivePrimaryLinker() |
String[] |
getAllSourceFiles()
Strictly for statistics gathering.
|
ResourceOracle |
getBuildResourceOracle() |
String |
getCanonicalName()
Returns the physical name for the module by which it can be found in the
classpath.
|
CompilationState |
getCompilationState(TreeLogger logger,
CompilerContext compilerContext) |
String[] |
getEntryPointTypeNames() |
String |
getFunctionName() |
List<Rule> |
getGeneratorRules() |
String |
getGwtXmlFilePath(String moduleName)
Returns the .gwt.xml file path for the given module referenced by name.
|
int |
getInputFilenameHash()
Calculates a hash of the filenames of all the input files for the GWT compiler.
|
Class<? extends Linker> |
getLinker(String name) |
Map<String,Class<? extends Linker>> |
getLinkers() |
String |
getName() |
Properties |
getProperties()
The properties that have been defined.
|
ResourceOracleImpl |
getPublicResourceOracle() |
long |
getResourceLastModified() |
Set<Resource> |
getResourcesNewerThan(long modificationTime) |
Deque<Rule> |
getRules()
Gets a reference to the internal rules for this module def.
|
Scripts |
getScripts()
Gets a reference to the internal scripts list for this module def.
|
String[] |
getServletPaths() |
Set<String> |
getSourceModuleNames(String typeSourceName)
Returns a set of the names of modules that source included the given type referenced by name.
|
ResourceOracle |
getSourceResourceOracle() |
Styles |
getStyles()
Gets a reference to the internal styles list for this module def.
|
boolean |
isGwtXmlFileStale() |
boolean |
isInherited(String moduleName) |
static boolean |
isValidModuleName(String moduleName) |
long |
lastModified() |
void |
mapServlet(String path,
String servletClassName)
For convenience in unit tests, servlets can be automatically loaded and
mapped in the embedded web server.
|
void |
recordModuleGwtXmlFile(String moduleName,
String fileSourcePath) |
void |
refresh() |
void |
setCollapseAllProperties(boolean collapse)
Mainly for testing and decreasing compile times.
|
void |
setNameOverride(String nameOverride)
Override the module's apparent name.
|
protected ResourceOracleImpl lazyPublicOracle
public ModuleDef(String name)
public ModuleDef(String name, ResourceLoader resources)
public ModuleDef(String name, ResourceLoader resources, boolean monolithic, boolean mergePathPrefixes)
public static boolean isValidModuleName(String moduleName)
public void addEntryPointTypeName(String typeName)
public void addGwtXmlFile(File xmlFile)
public void addLinker(String name)
public void addPublicPackage(String publicPackage, String[] includeList, String[] excludeList, String[] skipList, boolean defaultExcludes, boolean caseSensitive)
public void addResourcePath(String resourcePath)
public void addRule(Rule rule)
public void addSourcePackage(String sourcePackage, String[] includeList, String[] excludeList, String[] skipList, boolean defaultExcludes, boolean caseSensitive)
public void addSourcePackageImpl(String sourcePackage, String[] includeList, String[] excludeList, String[] skipList, boolean defaultExcludes, boolean caseSensitive, boolean isSuperSource)
public void addSuperSourcePackage(String superSourcePackage, String[] includeList, String[] excludeList, String[] skipList, boolean defaultExcludes, boolean caseSensitive)
public void clearEntryPoints()
public boolean deactivateLinker(String linkerName)
public void defineLinker(TreeLogger logger, String name, Class<? extends Linker> linker) throws UnableToCompleteException
UnableToCompleteException
public void enterModule(String canonicalModuleName)
public void exitModule()
public Resource findSourceFile(String partialPath)
null
otherwise.partialPath
- the partial path of the source filepublic String[] getAllSourceFiles()
public ResourceOracle getBuildResourceOracle()
public String getCanonicalName()
public CompilationState getCompilationState(TreeLogger logger, CompilerContext compilerContext) throws UnableToCompleteException
UnableToCompleteException
public String[] getEntryPointTypeNames()
public String getFunctionName()
public String getGwtXmlFilePath(String moduleName)
DepsInfoProvider
getGwtXmlFilePath
in interface DepsInfoProvider
public int getInputFilenameHash()
This is needed because the list of files could change without affecting the timestamp. For example, consider a glob that matches fewer files than before because a file was deleted.
public String getName()
public Properties getProperties()
public ResourceOracleImpl getPublicResourceOracle()
public long getResourceLastModified()
public Scripts getScripts()
public String[] getServletPaths()
public Set<String> getSourceModuleNames(String typeSourceName)
DepsInfoProvider
getSourceModuleNames
in interface DepsInfoProvider
public ResourceOracle getSourceResourceOracle()
public Styles getStyles()
public boolean isGwtXmlFileStale()
public boolean isInherited(String moduleName)
public long lastModified()
public void mapServlet(String path, String servletClassName)
path
- the url path at which the servlet residesservletClassName
- the name of the servlet to publishpublic void refresh()
public void setCollapseAllProperties(boolean collapse)
public void setNameOverride(String nameOverride)
nullwill disable the name override.
Copyright © 2018. All rights reserved.