public class DojoDependencyRule extends Object
| Constructor and Description |
|---|
DojoDependencyRule() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addJavaScriptDependency(DojoDependencies dependencies,
String path)
Adds the supplied path to the supplied
DojoDependencies object if the path exists. |
protected void |
addNonAmdJavaScriptDependency(DojoDependencies dependencies,
String path)
Adds the supplied path to the supplied
DojoDependencies object if the path exists. |
String |
getDeclarationRegex() |
Pattern |
getDeclarationRegexPattern() |
DependencyHandler |
getDependencyHandler() |
String |
getDependencyRegex() |
Pattern |
getDependencyRegexPattern() |
DojoDependencyHandler |
getDojoDependencyHandler() |
int |
getTargetGroup() |
Map<Pattern,String> |
getTokens()
Gets the token map for replacing tokens in dependencies.
|
protected void |
processDependency(String dependency,
String sourcePath,
String sourceContents,
Matcher matcher,
DojoDependencies dependencies) |
protected void |
processRegexRules(String filePath,
String fileContents,
DojoDependencies dependencies)
This method processes the regular expression that has been defined to detect a group of dependencies.
|
protected String |
replaceTokens(String input)
Replaces any tokens in the supplied input String.
|
void |
setDeclarationRegex(String declarationRegex) |
void |
setDependencyHandler(DependencyHandler dependencyHandler) |
void |
setDependencyRegex(String dependencyRegex) |
void |
setDojoDependencyHandler(DojoDependencyHandler dojoDependencyHandler) |
void |
setTargetGroup(int targetGroup) |
public Map<Pattern,String> getTokens()
protected String replaceTokens(String input)
input - Stringprotected void processRegexRules(String filePath, String fileContents, DojoDependencies dependencies)
This method processes the regular expression that has been defined to detect a group of dependencies.
filePath - The path of the dependency that has been requested.fileContents - The current modified file contentsdependencies - DojoDependenciesprotected void processDependency(String dependency, String sourcePath, String sourceContents, Matcher matcher, DojoDependencies dependencies)
dependency - The dependency as specified in the file being processedsourcePath - The source where the file was being processedsourceContents - TODOdependencies - The current DojoDependencies object for source file being processedprotected void addJavaScriptDependency(DojoDependencies dependencies, String path)
DojoDependencies object if the path exists. This uses the DependencyHandler
to check the paths existence and that a InputStream can be returned from it.dependencies - The DojoDependencies to updatepath - The path to check and addprotected void addNonAmdJavaScriptDependency(DojoDependencies dependencies, String path)
DojoDependencies object if the path exists. This uses the DependencyHandler
to check the paths existence and that a InputStream can be returned from it.dependencies - The DojoDependencies to updatepath - The path to check and addpublic String getDeclarationRegex()
public Pattern getDeclarationRegexPattern()
public void setDeclarationRegex(String declarationRegex)
public String getDependencyRegex()
public Pattern getDependencyRegexPattern()
public void setDependencyRegex(String dependencyRegex)
public int getTargetGroup()
public void setTargetGroup(int targetGroup)
public void setDojoDependencyHandler(DojoDependencyHandler dojoDependencyHandler)
public DojoDependencyHandler getDojoDependencyHandler()
public void setDependencyHandler(DependencyHandler dependencyHandler)
public DependencyHandler getDependencyHandler()
Copyright © 2005–2016 Alfresco Software. All rights reserved.