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


Java SelectorUtils.matchPatternStart方法代码示例

本文整理汇总了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;
}
 
开发者ID:apache,项目名称:ant,代码行数:21,代码来源:DirectoryScanner.java

示例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 );
}
 
开发者ID:subclipse,项目名称:svnant,代码行数:20,代码来源:SvnDirScanner.java

示例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);
}
 
开发者ID:apache,项目名称:ant,代码行数:20,代码来源:DirectoryScanner.java

示例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);
}
 
开发者ID:evlist,项目名称:orbeon-forms,代码行数:20,代码来源:DirectoryScanner.java


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