当前位置: 首页>>代码示例>>Java>>正文


Java SelectorUtils.match方法代码示例

本文整理汇总了Java中org.apache.tools.ant.types.selectors.SelectorUtils.match方法的典型用法代码示例。如果您正苦于以下问题:Java SelectorUtils.match方法的具体用法?Java SelectorUtils.match怎么用?Java SelectorUtils.match使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.tools.ant.types.selectors.SelectorUtils的用法示例。


在下文中一共展示了SelectorUtils.match方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: isIgnored

import org.apache.tools.ant.types.selectors.SelectorUtils; //导入方法依赖的package包/类
private static boolean isIgnored(
        final String[] patterns,
        final String resource) {
    for (String pattern : patterns) {
        if (SelectorUtils.match(pattern, resource)) {
            return true;
        }
    }
    return false;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:CustomJavac.java

示例2: isExcluded

import org.apache.tools.ant.types.selectors.SelectorUtils; //导入方法依赖的package包/类
@Override
public boolean isExcluded(String name) {
    boolean excluded = false;
    for (int p = 0; !excluded && p < patterns.size(); p++) {
        excluded = SelectorUtils.match(patterns.get(p), name);
    }
    return excluded;
}
 
开发者ID:SSEHUB,项目名称:EASyProducer,代码行数:9,代码来源:AntGenerator.java

示例3: addEntryContent

import org.apache.tools.ant.types.selectors.SelectorUtils; //导入方法依赖的package包/类
/**
 * Add an entry, copy if not an META-INF/service else merge them
 * @param zos
 * @param entry
 * @param in
 * @param services
 * @param once
 * @throws IOException
 */

private void addEntryContent(final ZipOutputStream zos, final ZipEntry entry, final InputStream  in, final Map<String, String> services, final Map<String, List<String>> once, final String source) throws IOException {
	for(final Exclude e : this.excludes) { if(e.name != null) { if(SelectorUtils.match(e.name, entry.getName())) return; } }
	if (entry.getName().startsWith("META-INF/services/")) {
		final String neu = readServiceFile(entry, in);
		final String old = services.get(entry.getName());
		if(old == null) services.put(entry.getName(), neu);
		else            services.put(entry.getName(), old+neu);
		return;
	}
	if(entry.getName().equals(WEB_FRAGMENT)) {
		if(this.webFragment == null) this.webFragment = new WebFragment(this.dest.getName());
		this.webFragment.merge(in, source);
		return;
	}

	List<String> duplicate = once.get(entry.getName());
	if(duplicate == null) {
		duplicate = new LinkedList<>();
		duplicate.add(source);
		once.put(entry.getName(), duplicate);
	} else {
		if(duplicate.contains(source)) {
			System.out.println("!!! SKIP Duplicate["+entry.getName()+"] in "+source);
		} else {
			duplicate.add(source);
			System.out.println("!!! SKIP Duplicate: "+entry.getName()+ " in "+duplicate);
		}
		return;
	}
	addToZipFile(source, entry, zos, in);
}
 
开发者ID:pescuma,项目名称:merge-jar-services,代码行数:42,代码来源:MergeServicesTask.java

示例4: match

import org.apache.tools.ant.types.selectors.SelectorUtils; //导入方法依赖的package包/类
/**
 * Tests whether or not a string matches against a pattern.
 * The pattern may contain two special characters:<br>
 * '*' means zero or more characters<br>
 * '?' means one and only one character
 *
 * @param pattern The pattern to match against.
 *                Must not be <code>null</code>.
 * @param str     The string which must be matched against the pattern.
 *                Must not be <code>null</code>.
 *
 * @return <code>true</code> if the string matches against the pattern,
 *         or <code>false</code> otherwise.
 */
public static boolean match( String pattern, String str ) {
    return SelectorUtils.match( pattern, str );
}
 
开发者ID:subclipse,项目名称:svnant,代码行数:18,代码来源:SvnDirScanner.java

示例5: match

import org.apache.tools.ant.types.selectors.SelectorUtils; //导入方法依赖的package包/类
/**
 * Test whether or not a string matches against a pattern.
 * The pattern may contain two special characters:<br>
 * '*' means zero or more characters<br>
 * '?' means one and only one character
 *
 * @param pattern The pattern to match against.
 *                Must not be <code>null</code>.
 * @param str     The string which must be matched against the pattern.
 *                Must not be <code>null</code>.
 *
 * @return <code>true</code> if the string matches against the pattern,
 *         or <code>false</code> otherwise.
 */
public static boolean match(final String pattern, final String str) {
    return SelectorUtils.match(pattern, str);
}
 
开发者ID:apache,项目名称:ant,代码行数:18,代码来源:DirectoryScanner.java

示例6: match

import org.apache.tools.ant.types.selectors.SelectorUtils; //导入方法依赖的package包/类
/**
 * Tests whether or not a string matches against a pattern.
 * The pattern may contain two special characters:<br>
 * '*' means zero or more characters<br>
 * '?' means one and only one character
 *
 * @param pattern The pattern to match against.
 *                Must not be <code>null</code>.
 * @param str     The string which must be matched against the pattern.
 *                Must not be <code>null</code>.
 *
 * @return <code>true</code> if the string matches against the pattern,
 *         or <code>false</code> otherwise.
 */
public static boolean match(String pattern, String str) {
    return SelectorUtils.match(pattern, str);
}
 
开发者ID:evlist,项目名称:orbeon-forms,代码行数:18,代码来源:DirectoryScanner.java

示例7: match

import org.apache.tools.ant.types.selectors.SelectorUtils; //导入方法依赖的package包/类
/**
 * Tests whether or not a string matches against a pattern.
 * The pattern may contain two special characters:<br>
 * '*' means zero or more characters<br>
 * '?' means one and only one character
 *
 * @param pattern The pattern to match against.
 *                Must not be <code>null</code>.
 * @param str     The string which must be matched against the pattern.
 *                Must not be <code>null</code>.
 * @param isCaseSensitive Whether or not matching should be performed
 *                        case sensitively.
 * @see SelectorUtils#match(java.lang.String, java.lang.String, boolean)
 *
 * @return <code>true</code> if the string matches against the pattern,
 *         or <code>false</code> otherwise.
 */
public static boolean match(String pattern, String str,
                            boolean isCaseSensitive) 
{
   return SelectorUtils.match(pattern, str, isCaseSensitive);
}
 
开发者ID:integrated,项目名称:jakarta-slide-webdavclient,代码行数:23,代码来源:Scanner.java


注:本文中的org.apache.tools.ant.types.selectors.SelectorUtils.match方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。