Commit 49f3a486 authored by Lionel Seinturier's avatar Lionel Seinturier

Rename Filter to Predicate as this is the name of the concept in JDK8.

parent ef795f3c
......@@ -41,7 +41,7 @@ import org.objectweb.fractal.julia.Controller;
import org.objectweb.fractal.julia.InitializationContext;
import org.objectweb.fractal.juliac.commons.lang.ClassHelper;
import org.objectweb.fractal.juliac.commons.lang.reflect.AnnotatedElementFilter;
import org.objectweb.fractal.juliac.commons.util.function.Filter;
import org.objectweb.fractal.juliac.commons.util.function.Predicate;
import org.objectweb.fractal.juliac.commons.util.function.Filters;
import org.objectweb.fractal.juliac.runtime.ClassLoaderFcItf;
import org.objectweb.fractal.juliac.runtime.ClassLoaderItf;
......@@ -159,7 +159,7 @@ implements Controller, SCAIntentController {
// Retrieve all methods annotated with annotcl
Method[] methods = ClassHelper.getAllMethods(cl);
Filter<AnnotatedElement> filter =
Predicate<AnnotatedElement> filter =
new AnnotatedElementFilter(annotcl.getName());
Method[] ms = Filters.filter(methods,filter);
......
......@@ -59,7 +59,7 @@ import org.objectweb.fractal.juliac.commons.lang.reflect.AnnotatedElementFilter;
import org.objectweb.fractal.juliac.commons.lang.reflect.AnnotatedElementHelper;
import org.objectweb.fractal.juliac.commons.lang.reflect.MethodHelper;
import org.objectweb.fractal.juliac.commons.util.function.CompositeOrFilter;
import org.objectweb.fractal.juliac.commons.util.function.Filter;
import org.objectweb.fractal.juliac.commons.util.function.Predicate;
import org.objectweb.fractal.juliac.commons.util.function.Filters;
import org.osoa.sca.annotations.ConversationAttributes;
import org.osoa.sca.annotations.ConversationID;
......@@ -245,7 +245,7 @@ public class ContentClassMetaData {
*/
Constructor<?>[] constructors =
fcContentClass.getDeclaredConstructors();
Filter<AnnotatedElement> filter =
Predicate<AnnotatedElement> filter =
new AnnotatedElementFilter(
org.oasisopen.sca.annotation.Constructor.class.getName(),
"org.osoa.sca.annotations.Constructor");
......
......@@ -27,7 +27,7 @@ import java.lang.reflect.AnnotatedElement;
import org.objectweb.fractal.fraclet.annotations.Lifecycle;
import org.objectweb.fractal.fraclet.types.Step;
import org.objectweb.fractal.juliac.commons.util.function.Filter;
import org.objectweb.fractal.juliac.commons.util.function.Predicate;
/**
* Class for filtering @Lifecycle annotated code elements.
......@@ -36,7 +36,7 @@ import org.objectweb.fractal.juliac.commons.util.function.Filter;
* @since 1.4.1
*/
public class LifecycleAnnotatedElementFilter
implements Filter<AnnotatedElement> {
implements Predicate<AnnotatedElement> {
private Step step;
......@@ -44,7 +44,7 @@ implements Filter<AnnotatedElement> {
this.step = step;
}
public boolean accept( AnnotatedElement value ) {
public boolean test( AnnotatedElement value ) {
Lifecycle lc = value.getAnnotation(Lifecycle.class);
if( lc == null ) {
return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment