本文整理汇总了Java中org.apache.tools.ant.types.PatternSet.getIncludePatterns方法的典型用法代码示例。如果您正苦于以下问题:Java PatternSet.getIncludePatterns方法的具体用法?Java PatternSet.getIncludePatterns怎么用?Java PatternSet.getIncludePatterns使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.tools.ant.types.PatternSet
的用法示例。
在下文中一共展示了PatternSet.getIncludePatterns方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: fixJarName
import org.apache.tools.ant.types.PatternSet; //导入方法依赖的package包/类
private String fixJarName(String prefixDir, String name) {
if (prefixDir.endsWith("locale/") && baseFiles != null) {
prefixDir = prefixDir.substring(0, prefixDir.length() - 7);
PatternSet bf = (PatternSet)getProject().getReference(baseFiles);
for (String p : bf.getIncludePatterns(getProject())) {
if (p.startsWith(prefixDir)) {
String realName = p.substring(prefixDir.length());
if (realName.indexOf('/') != -1 || realName.indexOf('\\') != -1) {
continue;
}
int indx = realName.indexOf(name);
if (indx == -1) {
continue;
}
return realName.substring(0, indx + name.length());
}
}
}
if (name.equals("autoupdate-ui_nb")) {
return "org-netbeans-modules-autoupdate-ui_nb";
}
if (name.equals("options-api_nb")) {
return "org-netbeans-modules-options-api_nb";
}
if (name.equals("uihandler_nb")) {
return "org-netbeans-modules-uihandler_nb";
}
return name;
}
示例2: setJars
import org.apache.tools.ant.types.PatternSet; //导入方法依赖的package包/类
/**
* Setter for the "jars" attribute (required if no "jarfileset" is present)
*
* @deprecated Use <jarfileset> and/or <jarfilelist> nested tasks instead.
*
* @param s A list of jar files or patternsets (space or comma seperated)
*/
public void setJars(String s) {
PatternSet patset = new PatternSet();
patset.setIncludes(s);
String[] jarNames = patset.getIncludePatterns(getProject());
for (int i = 0; i < jarNames.length; i++)
mJarAttrs.add(getProject().resolveFile(jarNames[i]));
}
示例3: setExecs
import org.apache.tools.ant.types.PatternSet; //导入方法依赖的package包/类
/**
* Setter for the "execs" attribute
*
* @deprecated Use <execfileset/> or <execfilelist/> nested tasks instead.
*
* @param s A list of files or patternsets (space or comma seperated)
*/
public void setExecs(String s) {
PatternSet patset = new PatternSet();
patset.setIncludes(s);
String[] execNames = patset.getIncludePatterns(getProject());
for (int i = 0; i < execNames.length; i++) {
File f = new File(execNames[i]);
mExecAttrs.add(f);
}
}
示例4: setExtraclasspath
import org.apache.tools.ant.types.PatternSet; //导入方法依赖的package包/类
/**
* Setter for the "extraclasspath" attribute (optional)
*
* @param s A list of files or patternsets (space or comma seperated)
*/
public void setExtraclasspath(String s) {
if (s == null || s.trim().equals("")) return;
PatternSet patset = new PatternSet();
patset.setIncludes(s);
String[] cpNames = patset.getIncludePatterns(getProject());
for (int i = 0; i < cpNames.length; i++) {
File f = new File(cpNames[i]);
mExtraClassPathAttrs.add(f);
}
}
示例5: setJars
import org.apache.tools.ant.types.PatternSet; //导入方法依赖的package包/类
/**
* Setter for the "jars" attribute (required if no "jarfileset" is present)
*/
public void setJars(String s) {
PatternSet patset = new PatternSet();
patset.setIncludes(s);
String[] jarNames = patset.getIncludePatterns(getProject());
for (int i = 0; i < jarNames.length; i++)
mJarAttrs.add(getProject().resolveFile(jarNames[i]));
}
示例6: setExecs
import org.apache.tools.ant.types.PatternSet; //导入方法依赖的package包/类
/**
* Setter for the "execs" attribute (optional)
*/
public void setExecs(String s) {
PatternSet patset = new PatternSet();
patset.setIncludes(s);
String[] execNames = patset.getIncludePatterns(getProject());
for (int i = 0; i < execNames.length; i++) {
File f = new File(execNames[i]);
mExecAttrs.add(f);
}
}
示例7: setExtraclasspath
import org.apache.tools.ant.types.PatternSet; //导入方法依赖的package包/类
/**
* Setter for the "extraclasspath" attribute (optional)
*/
public void setExtraclasspath(String s) {
if (s == null || s.trim().equals("")) return;
PatternSet patset = new PatternSet();
patset.setIncludes(s);
String[] cpNames = patset.getIncludePatterns(getProject());
for (int i = 0; i < cpNames.length; i++) {
File f = new File(cpNames[i]);
mExtraClassPathAttrs.add(f);
}
}
示例8: hasPatterns
import org.apache.tools.ant.types.PatternSet; //导入方法依赖的package包/类
private boolean hasPatterns(PatternSet ps) {
String[] includePatterns = ps.getIncludePatterns(getProject());
String[] excludePatterns = ps.getExcludePatterns(getProject());
return (includePatterns != null && includePatterns.length > 0)
|| (includePatterns != null && excludePatterns.length > 0);
}
示例9: getS3Scanner
import org.apache.tools.ant.types.PatternSet; //导入方法依赖的package包/类
/**
* Returns a file scanner for an S3 repository.
*
* @param bucket The bucket to scan
* @param patterns The patterns to scan for
* @param baseDirectory The 'directory' to start the scan at
* @return An initialized scanner
*/
protected S3Scanner getS3Scanner(S3Bucket bucket, PatternSet patterns, String baseDirectory) {
return new S3Scanner(bucket, baseDirectory, patterns.getIncludePatterns(this.project), patterns.getExcludePatterns(this.project));
}