本文整理汇总了Java中org.apache.tools.ant.types.selectors.SelectorUtils.matchPatternStart方法的典型用法代码示例。如果您正苦于以下问题:Java SelectorUtils.matchPatternStart方法的具体用法?Java SelectorUtils.matchPatternStart怎么用?Java SelectorUtils.matchPatternStart使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.tools.ant.types.selectors.SelectorUtils
的用法示例。
在下文中一共展示了SelectorUtils.matchPatternStart方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: shouldSkipPattern
import org.apache.tools.ant.types.selectors.SelectorUtils; //导入方法依赖的package包/类
/**
* true if the pattern specifies a relative path without basedir
* or an absolute path not inside basedir.
*
* @since Ant 1.8.0
*/
private boolean shouldSkipPattern(final String pattern) {
if (FileUtils.isAbsolutePath(pattern)) {
//skip abs. paths not under basedir, if set:
if (!(basedir == null || SelectorUtils.matchPatternStart(pattern,
basedir.getAbsolutePath(),
isCaseSensitive()))) {
return true;
}
} else if (basedir == null) {
//skip non-abs. paths if basedir == null:
return true;
}
return false;
}
示例2: matchPatternStart
import org.apache.tools.ant.types.selectors.SelectorUtils; //导入方法依赖的package包/类
/**
* Tests whether or not a given path matches the start of a given
* pattern up to the first "**".
* <p>
* This is not a general purpose test and should only be used if you
* can live with false positives. For example, <code>pattern=**\a</code>
* and <code>str=b</code> will yield <code>true</code>.
*
* @param pattern The pattern to match against. Must not be
* <code>null</code>.
* @param str The path to match, as a String. Must not be
* <code>null</code>.
*
* @return whether or not a given path matches the start of a given
* pattern up to the first "**".
*/
protected static boolean matchPatternStart( String pattern, String str ) {
return SelectorUtils.matchPatternStart( pattern, str );
}
示例3: matchPatternStart
import org.apache.tools.ant.types.selectors.SelectorUtils; //导入方法依赖的package包/类
/**
* Test whether or not a given path matches the start of a given
* pattern up to the first "**".
* <p>
* This is not a general purpose test and should only be used if you
* can live with false positives. For example, <code>pattern=**\a</code>
* and <code>str=b</code> will yield <code>true</code>.
*
* @param pattern The pattern to match against. Must not be
* <code>null</code>.
* @param str The path to match, as a String. Must not be
* <code>null</code>.
*
* @return whether or not a given path matches the start of a given
* pattern up to the first "**".
*/
protected static boolean matchPatternStart(final String pattern, final String str) {
return SelectorUtils.matchPatternStart(pattern, str);
}
示例4: matchPatternStart
import org.apache.tools.ant.types.selectors.SelectorUtils; //导入方法依赖的package包/类
/**
* Tests whether or not a given path matches the start of a given
* pattern up to the first "**".
* <p>
* This is not a general purpose test and should only be used if you
* can live with false positives. For example, <code>pattern=**\a</code>
* and <code>str=b</code> will yield <code>true</code>.
*
* @param pattern The pattern to match against. Must not be
* <code>null</code>.
* @param str The path to match, as a String. Must not be
* <code>null</code>.
*
* @return whether or not a given path matches the start of a given
* pattern up to the first "**".
*/
protected static boolean matchPatternStart(String pattern, String str) {
return SelectorUtils.matchPatternStart(pattern, str);
}