本文整理汇总了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;
}
示例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;
}
示例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);
}
示例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 );
}
示例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);
}
示例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);
}
示例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);
}