• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java SelectorUtils类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.codehaus.plexus.util.SelectorUtils的典型用法代码示例。如果您正苦于以下问题:Java SelectorUtils类的具体用法?Java SelectorUtils怎么用?Java SelectorUtils使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: normalizePattern

import org.codehaus.plexus.util.SelectorUtils; //导入依赖的package包/类
private static String normalizePattern(String pattern) {
  pattern = pattern.trim();

  if (pattern.startsWith(SelectorUtils.REGEX_HANDLER_PREFIX)) {
    if (File.separatorChar == '\\') {
      pattern = StringUtils.replace(pattern, "/", "\\\\");
    }
    else {
      pattern = StringUtils.replace(pattern, "\\\\", "/");
    }
  }
  else {
    pattern = pattern.replace(File.separatorChar == '/' ? '\\' : '/', File.separatorChar);

    if (pattern.endsWith(File.separator)) {
      pattern += "**";
    }
  }

  return pattern;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:MavenResourceFileFilter.java


示例2: matches6004

import org.codehaus.plexus.util.SelectorUtils; //导入依赖的package包/类
/**
 * field type changed
 */
private boolean matches6004( ApiDifference apiDiff )
{
    throwIfMissing( true, false, true, true );

    if ( !SelectorUtils.matchPath( field, apiDiff.getAffectedField() ) )
    {
        return false;
    }

    String[] args = getArgs( apiDiff );
    String diffFrom = args[0];
    String diffTo = args[1];

    return SelectorUtils.matchPath( from, diffFrom ) && SelectorUtils.matchPath( to, diffTo );
}
 
开发者ID:mojohaus,项目名称:clirr-maven-plugin,代码行数:19,代码来源:Difference.java


示例3: isSelected

import org.codehaus.plexus.util.SelectorUtils; //导入依赖的package包/类
public boolean isSelected( JavaClass javaClass )
{
    boolean result = false;
    if ( alwaysTrue )
    {
        result = true;
    }
    else
    {
        String path = javaClass.getClassName().replace( '.', '/' );
        for ( int i = 0; i < includes.length && !result; i++ )
        {
            result = SelectorUtils.matchPath( includes[i], path );
        }

        if ( excludes != null )
        {
            for ( int i = 0; i < excludes.length && result; i++ )
            {
                result = !SelectorUtils.matchPath( excludes[i], path );
            }
        }
    }

    return result;
}
 
开发者ID:mojohaus,项目名称:clirr-maven-plugin,代码行数:27,代码来源:ClirrClassFilter.java


示例4: isIncluded

import org.codehaus.plexus.util.SelectorUtils; //导入依赖的package包/类
private boolean isIncluded( String path )
{
    if ( includes != null && !includes.isEmpty() )
    {
        for ( String include : includes )
        {
            if ( SelectorUtils.matchPath( include, path, true ) )
            {
                return true;
            }
        }
        return false;
    }
    return true;
}
 
开发者ID:javiersigler,项目名称:apache-maven-shade-plugin,代码行数:16,代码来源:SimpleRelocator.java


示例5: isExcluded

import org.codehaus.plexus.util.SelectorUtils; //导入依赖的package包/类
private boolean isExcluded( String path )
{
    if ( excludes != null && !excludes.isEmpty() )
    {
        for ( String exclude : excludes )
        {
            if ( SelectorUtils.matchPath( exclude, path, true ) )
            {
                return true;
            }
        }
    }
    return false;
}
 
开发者ID:javiersigler,项目名称:apache-maven-shade-plugin,代码行数:15,代码来源:SimpleRelocator.java


示例6: matchPaths

import org.codehaus.plexus.util.SelectorUtils; //导入依赖的package包/类
private boolean matchPaths( Set<String> patterns, String classFile )
{
    for ( String pattern : patterns )
    {

        if ( SelectorUtils.matchPath( pattern, classFile ) )
        {
            return true;
        }
    }

    return false;
}
 
开发者ID:javiersigler,项目名称:apache-maven-shade-plugin,代码行数:14,代码来源:SimpleFilter.java


示例7: inIncludeList

import org.codehaus.plexus.util.SelectorUtils; //导入依赖的package包/类
/**
 * Determines if one of the given patterns matches the given name, or if the include list is null
 * or empty the file will be included
 *
 * @param name string to match
 * @param includes list of string patterns to match on
 * @return true if the name is a match, false if not
 */
public static boolean inIncludeList(String name, String[] includes) {
    if ((includes == null) || (includes.length == 0)) {
        return true;
    }

    for (String include : includes) {
        if (SelectorUtils.matchPath(include, name, false)) {
            return true;
        }
    }

    return false;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:22,代码来源:ThemeBuilderUtils.java


示例8: inExcludeList

import org.codehaus.plexus.util.SelectorUtils; //导入依赖的package包/类
/**
 * Determines if one of the given patterns matches the given name, or if the exclude list is null
 * or empty the file will not be excluded
 *
 * @param name string to match
 * @param excludes list of string patterns to match on
 * @return true if the name is a match, false if not
 */
public static boolean inExcludeList(String name, String[] excludes) {
    if ((excludes == null) || (excludes.length == 0)) {
        return false;
    }

    for (String exclude : excludes) {
        if (SelectorUtils.matchPath(exclude, name, false)) {
            return true;
        }
    }

    return false;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:22,代码来源:ThemeBuilderUtils.java


示例9: matches4000

import org.codehaus.plexus.util.SelectorUtils; //导入依赖的package包/类
/**
 * Added interface to the set of implemented interfaces
 */
private boolean matches4000( ApiDifference apiDiff )
{
    throwIfMissing( false, false, false, true );

    String newIface = getArgs( apiDiff )[0];
    newIface = newIface.replace( '.', '/' );

    return SelectorUtils.matchPath( to, newIface, "/", true );
}
 
开发者ID:mojohaus,项目名称:clirr-maven-plugin,代码行数:13,代码来源:Difference.java


示例10: matches4001

import org.codehaus.plexus.util.SelectorUtils; //导入依赖的package包/类
/**
 * Removed interface from the set of implemented interfaces
 */
private boolean matches4001( ApiDifference apiDiff )
{
    throwIfMissing( false, false, false, true );

    String removedIface = getArgs( apiDiff )[0];
    removedIface = removedIface.replace( '.', '/' );

    return SelectorUtils.matchPath( to, removedIface, "/", true );
}
 
开发者ID:mojohaus,项目名称:clirr-maven-plugin,代码行数:13,代码来源:Difference.java


示例11: matches5000

import org.codehaus.plexus.util.SelectorUtils; //导入依赖的package包/类
/**
 * Added class to the set of superclasses
 */
private boolean matches5000( ApiDifference apiDiff )
{
    throwIfMissing( false, false, false, true );

    String newSuperclass = getArgs( apiDiff )[0];
    newSuperclass = newSuperclass.replace( '.', '/' );

    return SelectorUtils.matchPath( to, newSuperclass, "/", true );
}
 
开发者ID:mojohaus,项目名称:clirr-maven-plugin,代码行数:13,代码来源:Difference.java


示例12: matches5001

import org.codehaus.plexus.util.SelectorUtils; //导入依赖的package包/类
/**
 * Removed class from the set of superclasses
 */
private boolean matches5001( ApiDifference apiDiff )
{
    throwIfMissing( false, false, false, true );

    String removedSuperclass = getArgs( apiDiff )[0];
    removedSuperclass = removedSuperclass.replace( '.', '/' );

    return SelectorUtils.matchPath( to, removedSuperclass, "/", true );
}
 
开发者ID:mojohaus,项目名称:clirr-maven-plugin,代码行数:13,代码来源:Difference.java


示例13: matches7005

import org.codehaus.plexus.util.SelectorUtils; //导入依赖的package包/类
/**
 * Method Argument Type changed
 */
private boolean matches7005( List<ApiDifference> apiDiffs )
{
    throwIfMissing( false, true, false, true );

    ApiDifference firstDiff = apiDiffs.get( 0 );
    String methodSig = removeVisibilityFromMethodSignature( firstDiff );
    if ( !SelectorUtils.matchPath( method, methodSig ) )
    {
        return false;
    }

    String newMethodSig = getNewMethodSignature( methodSig, apiDiffs );
    return SelectorUtils.matchPath( to, newMethodSig );
}
 
开发者ID:mojohaus,项目名称:clirr-maven-plugin,代码行数:18,代码来源:Difference.java


示例14: matches7006

import org.codehaus.plexus.util.SelectorUtils; //导入依赖的package包/类
/**
 * Method Return Type changed
 */
private boolean matches7006( ApiDifference apiDiff )
{
    throwIfMissing( false, true, false, true );

    String methodSig = removeVisibilityFromMethodSignature( apiDiff );
    if ( !SelectorUtils.matchPath( method, methodSig ) )
    {
        return false;
    }

    String newRetType = getArgs( apiDiff )[0];

    return SelectorUtils.matchPath( to, newRetType );
}
 
开发者ID:mojohaus,项目名称:clirr-maven-plugin,代码行数:18,代码来源:Difference.java


示例15: matches

import org.codehaus.plexus.util.SelectorUtils; //导入依赖的package包/类
static boolean matches(Artifact artifact, Set<String> set) {
    Set<String> expanded = expand(set);
    String coords = String.format(ARTIFACT_FORMAT, artifact.getGroupId(),
            artifact.getArtifactId(),
            artifact.getVersion(),
            artifact.getType(),
            artifact.getClassifier());

    for (String e : expanded) {
        if (SelectorUtils.match(e, coords)) {
            return true;
        }
    }
    return false;
}
 
开发者ID:sundrio,项目名称:sundrio,代码行数:16,代码来源:ArtifactRuleFilter.java


示例16: isIncluded

import org.codehaus.plexus.util.SelectorUtils; //导入依赖的package包/类
private boolean isIncluded(String path)
{
  if (includes != null && !includes.isEmpty())
  {
    for (String include : includes)
    {
      if (SelectorUtils.matchPath(include, path, true))
      {
        return true;
      }
    }
    return false;
  }
  return true;
}
 
开发者ID:immutables,项目名称:maven-shade-plugin,代码行数:16,代码来源:SimpleRelocator.java


示例17: isExcluded

import org.codehaus.plexus.util.SelectorUtils; //导入依赖的package包/类
private boolean isExcluded(String path)
{
  if (excludes != null && !excludes.isEmpty())
  {
    for (String exclude : excludes)
    {
      if (SelectorUtils.matchPath(exclude, path, true))
      {
        return true;
      }
    }
  }
  return false;
}
 
开发者ID:immutables,项目名称:maven-shade-plugin,代码行数:15,代码来源:SimpleRelocator.java


示例18: getFileName

import org.codehaus.plexus.util.SelectorUtils; //导入依赖的package包/类
protected String getFileName(final String sourceFile) {
    String extension = FileUtils.extension(sourceFile);
    String[] matchingExtensionFiles = scanFor(extension);

    for (String matchingExtensionFile : matchingExtensionFiles) {
        if (SelectorUtils.matchPath("**/" + sourceFile, matchingExtensionFile, true)) {
            return matchingExtensionFile;
        }
    }

    return sourceFile;
}
 
开发者ID:trautonen,项目名称:coveralls-maven-plugin,代码行数:13,代码来源:ScanSourceLoader.java


示例19: match

import org.codehaus.plexus.util.SelectorUtils; //导入依赖的package包/类
private boolean match( String str, String pattern )
{
    return SelectorUtils.match( pattern, str );
}
 
开发者ID:javiersigler,项目名称:apache-maven-shade-plugin,代码行数:5,代码来源:ArtifactId.java


示例20: matches6000

import org.codehaus.plexus.util.SelectorUtils; //导入依赖的package包/类
/**
 * added field
 */
private boolean matches6000( ApiDifference apiDiff )
{
    throwIfMissing( true, false, false, false );
    return SelectorUtils.matchPath( field, apiDiff.getAffectedField() );
}
 
开发者ID:mojohaus,项目名称:clirr-maven-plugin,代码行数:9,代码来源:Difference.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java DataCopyReducer类代码示例发布时间:2022-05-22
下一篇:
Java RichSourceFunction类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap