Package net.sf.basedb.core.snapshot
Class AnnotationFilter
java.lang.Object
net.sf.basedb.core.snapshot.AnnotationFilter
- All Implemented Interfaces:
Filter<AnnotationSnapshot>
Filter implementation that finds the annotation snapshot
for a given annotation.
- Version:
- 2.14
- Author:
- Nicklas
- Last modified
- $Date: 2015-06-02 11:26:24 +0200 (ti, 02 jun 2015) $
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreate a filter that matches all annotations.Create a filter that matches a specfic annotation. -
Method Summary
Modifier and TypeMethodDescriptionboolean
evaluate
(AnnotationSnapshot snapshot) Evaluate if the given object should pass the filter or not.void
Set the annotation this filter should match.void
setAnnotationId
(int annotationId) Set the annotation this filter should match.
-
Field Details
-
annotationId
private int annotationId
-
-
Constructor Details
-
AnnotationFilter
public AnnotationFilter()Create a filter that matches all annotations. -
AnnotationFilter
Create a filter that matches a specfic annotation.
-
-
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
-
setAnnotation
Set the annotation this filter should match.- Parameters:
a
- A specific annotation, or null to match any annotation
-
setAnnotationId
public void setAnnotationId(int annotationId) Set the annotation this filter should match.- Parameters:
annotationId
- A specific annotation, or 0 to match any annotation- Since:
- 2.14.1
-