Author: simonetripodi
Date: Sun Dec 4 00:29:46 2011
New Revision: 1210038
URL: http://svn.apache.org/viewvc?rev=1210038&view=rev
Log:
removed nonsense filter implementation
Removed:
commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/filter/ContainsMethod.java
Modified:
commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/HandlerConfiguration.java
commons/sandbox/meiyo/trunk/src/test/java/org/apache/commons/meiyo/classpath/filter/FiltersTestCase.java
Modified:
commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/HandlerConfiguration.java
URL:
http://svn.apache.org/viewvc/commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/HandlerConfiguration.java?rev=1210038&r1=1210037&r2=1210038&view=diff
==============================================================================
---
commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/HandlerConfiguration.java
(original)
+++
commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/HandlerConfiguration.java
Sun Dec 4 00:29:46 2011
@@ -29,7 +29,6 @@ import org.apache.commons.meiyo.classpat
import org.apache.commons.meiyo.classpath.filter.AnnotatedWithType;
import org.apache.commons.meiyo.classpath.filter.Any;
import org.apache.commons.meiyo.classpath.filter.ClassNameMatches;
-import org.apache.commons.meiyo.classpath.filter.ContainsMethod;
import org.apache.commons.meiyo.classpath.filter.Filter;
import org.apache.commons.meiyo.classpath.filter.InPackage;
import org.apache.commons.meiyo.classpath.filter.InSubpackage;
@@ -166,24 +165,6 @@ public abstract class HandlerConfigurati
}
/**
- * Creates a new {@code Filter} that checks the Class found in the
ClassPath contains the method with the
- * given name and arguments type.
- *
- * @param name The method name has to be looked for in the Classes found
in the ClassPath
- * @param argumentsType The method arguments type
- * @return a new {@code Filter} instance.
- */
- protected final Filter containsMethod( String name, Class<?>...
argumentsType )
- {
- if ( name == null )
- {
- throw new IllegalArgumentException( "Parameter 'name' must not be
null" );
- }
-
- return new ContainsMethod( name, argumentsType );
- }
-
- /**
* Creates a new {@code Filter} that checks the Class found in the
ClassPath is in exactly the given package.
*
* @param targetPackage The package which Classes found in the ClassPath
have to be contained in.
Modified:
commons/sandbox/meiyo/trunk/src/test/java/org/apache/commons/meiyo/classpath/filter/FiltersTestCase.java
URL:
http://svn.apache.org/viewvc/commons/sandbox/meiyo/trunk/src/test/java/org/apache/commons/meiyo/classpath/filter/FiltersTestCase.java?rev=1210038&r1=1210037&r2=1210038&view=diff
==============================================================================
---
commons/sandbox/meiyo/trunk/src/test/java/org/apache/commons/meiyo/classpath/filter/FiltersTestCase.java
(original)
+++
commons/sandbox/meiyo/trunk/src/test/java/org/apache/commons/meiyo/classpath/filter/FiltersTestCase.java
Sun Dec 4 00:29:46 2011
@@ -21,7 +21,6 @@ package org.apache.commons.meiyo.classpa
import java.util.List;
-import org.apache.commons.meiyo.classpath.ClassLoaderBuilder;
import org.apache.commons.meiyo.classpath.ClassPathScanner;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -72,20 +71,4 @@ public final class FiltersTestCase
assert !isAbstract.matches( Filter.class );
}
- @Test
- public void matchesContainsMethodWithNoArguments()
- {
- Filter containsMethod = new ContainsMethod( "usingContextClassLoader"
);
- assert containsMethod.matches( ClassLoaderBuilder.class );
- assert !containsMethod.matches( Filter.class );
- }
-
- @Test
- public void matchesContainsMethodWithArguments()
- {
- Filter containsMethod = new ContainsMethod( "matches", Class.class );
- assert containsMethod.matches( Filter.class );
- assert !containsMethod.matches( ClassPathScanner.class );
- }
-
}