public class ModuleDef extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ModuleDef.ModuleType
Marks a module in a way that can be used to calculate the effective bounds of a library module
in a module tree.
|
Constructor and Description |
---|
ModuleDef(String name) |
ModuleDef(String name,
ResourceLoader resources) |
ModuleDef(String name,
ResourceLoader resources,
boolean monolithic) |
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 |
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 |
clear()
Free up memory no longer needed in later compile stages.
|
void |
clearEntryPoints() |
void |
defineLinker(TreeLogger logger,
String name,
Class<? extends Linker> linker)
Associate a Linker class with a symbolic name.
|
void |
enterModule(ModuleDef.ModuleType moduleType)
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.
At the moment the ModuleDef uses it's monolithic property in combination with the entering modules ModuleType to updates its idea of attribute source. |
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() |
Collection<URL> |
getAllCompilationUnitArchiveURLs()
Returns URLs to fetch archives of precompiled compilation units.
|
String[] |
getAllPublicFiles() |
String[] |
getAllSourceFiles()
Strictly for statistics gathering.
|
String |
getCanonicalName()
Returns the physical name for the module by which it can be found in the
classpath.
|
CompilationState |
getCompilationState(TreeLogger logger)
Deprecated.
|
CompilationState |
getCompilationState(TreeLogger logger,
CompilerContext compilerContext) |
String[] |
getEntryPointTypeNames() |
String |
getFunctionName() |
Class<? extends Linker> |
getLinker(String name) |
Map<String,Class<? extends Linker>> |
getLinkers() |
String |
getName() |
Properties |
getProperties()
The properties that have been defined.
|
ResourceOracle |
getResourcesOracle() |
Rules |
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() |
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 |
refresh() |
void |
setCollapseAllProperties(boolean collapse)
Mainly for testing and decreasing compile times.
|
void |
setNameOverride(String nameOverride)
Override the module's apparent name.
|
public ModuleDef(String name)
public ModuleDef(String name, ResourceLoader resources)
public ModuleDef(String name, ResourceLoader resources, boolean monolithic)
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 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 clear()
refresh()
will restore them.public void clearEntryPoints()
public void defineLinker(TreeLogger logger, String name, Class<? extends Linker> linker) throws UnableToCompleteException
UnableToCompleteException
public void enterModule(ModuleDef.ModuleType moduleType)
public void exitModule()
public Resource findSourceFile(String partialPath)
null
otherwise.partialPath
- the partial path of the source filepublic Collection<URL> getAllCompilationUnitArchiveURLs()
CompileModule
public String[] getAllPublicFiles()
public String[] getAllSourceFiles()
public String getCanonicalName()
@Deprecated public CompilationState getCompilationState(TreeLogger logger) throws UnableToCompleteException
UnableToCompleteException
public CompilationState getCompilationState(TreeLogger logger, CompilerContext compilerContext) throws UnableToCompleteException
UnableToCompleteException
public String[] getEntryPointTypeNames()
public String getFunctionName()
public String getName()
public Properties getProperties()
public ResourceOracle getResourcesOracle()
public Rules getRules()
public Scripts getScripts()
public String[] getServletPaths()
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)
null will disable the name override.
Copyright © 2018. All rights reserved.