本文整理汇总了Java中org.codehaus.plexus.util.SelectorUtils类的典型用法代码示例。如果您正苦于以下问题:Java SelectorUtils类的具体用法?Java SelectorUtils怎么用?Java SelectorUtils使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SelectorUtils类属于org.codehaus.plexus.util包,在下文中一共展示了SelectorUtils类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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 );
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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 );
}
示例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 );
}
示例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 );
}
示例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 );
}
示例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 );
}
示例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 );
}
示例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;
}