Package net.sf.basedb.core.snapshot
Class AnnotationTypeFilter
java.lang.Object
net.sf.basedb.core.snapshot.AnnotationTypeFilter
- All Implemented Interfaces:
Filter<AnnotationSnapshot>
public class AnnotationTypeFilter extends Object implements Filter<AnnotationSnapshot>
Filter implementation that finds all annotation snapshots
for a given annotation type.
- Version:
- 2.14
- Author:
- Nicklas
- Last modified
- $Date: 2009-10-14 09:44:14 +0200 (on, 14 okt 2009) $
-
Field Summary
Fields Modifier and Type Field Description private int
annotationTypeId
-
Constructor Summary
Constructors Constructor Description AnnotationTypeFilter()
Create a filter that matches all annotation types.AnnotationTypeFilter(AnnotationType at)
Create a filter that matches a specfic annotation type. -
Method Summary
Modifier and Type Method Description boolean
evaluate(AnnotationSnapshot snapshot)
Evaluate if the given object should pass the filter or not.void
setAnnotationType(AnnotationType at)
Set the annotation type this filter should match.
-
Field Details
-
annotationTypeId
private int annotationTypeId
-
-
Constructor Details
-
AnnotationTypeFilter
public AnnotationTypeFilter()Create a filter that matches all annotation types. -
AnnotationTypeFilter
Create a filter that matches a specfic annotation type.
-
-
Method Details
-
evaluate
Description copied from interface:Filter
Evaluate if the given object should pass the filter or not.- Specified by:
evaluate
in interfaceFilter<AnnotationSnapshot>
- Parameters:
snapshot
- The object to evaluate- Returns:
- TRUE if the object passes the filter, FALSE otherwise
-
setAnnotationType
Set the annotation type this filter should match.- Parameters:
at
- A specific annotation type, or null to match any annotation type
-