KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > spoon > support > query > TypeFilter


1 package spoon.support.query;
2
3 import spoon.reflect.declaration.CtElement;
4
5 /**
6  * This simple filter matches all the elements of a given type.
7  */

8 public class TypeFilter<T extends CtElement> extends AbstractFilter<T> {
9
10     /**
11      * Creates the filter.
12      *
13      * @param type the type that matches
14      */

15     public TypeFilter(Class JavaDoc<T> type) {
16         super(type);
17     }
18
19     public boolean matches(T element) {
20         return true;
21     }
22 }
Popular Tags