KickJava   Java API By Example, From Geeks To Geeks.

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


1 package spoon.support.query;
2
3 import spoon.reflect.reference.CtReference;
4 import spoon.reflect.visitor.ReferenceFilter;
5
6 /**
7  * This class defines an abstract reference filter that needs to be subclassed
8  * in order to define the matching criteria.
9  *
10  * @see spoon.reflect.visitor.ReferenceFilter#matches(CtReference)
11  */

12 public abstract class AbstractReferenceFilter<T extends CtReference> implements
13         ReferenceFilter<T> {
14
15     Class JavaDoc<T> type;
16
17     /**
18      * Creates a reference filter with the type of the potentitally matching
19      * references.
20      */

21     @SuppressWarnings JavaDoc("unchecked")
22     public AbstractReferenceFilter(Class JavaDoc<?> type) {
23         this.type = (Class JavaDoc<T>) type;
24     }
25
26     public Class JavaDoc<T> getType() {
27         return type;
28     }
29
30 }
31
Popular Tags