public class AnnotationFilter extends java.lang.Object implements Filter<AnnotationSnapshot>
Modifier and Type | Field and Description |
---|---|
private int |
annotationId |
Constructor and Description |
---|
AnnotationFilter()
Create a filter that matches all annotations.
|
AnnotationFilter(Annotation a)
Create a filter that matches a specfic annotation.
|
Modifier and Type | Method and Description |
---|---|
boolean |
evaluate(AnnotationSnapshot snapshot)
Evaluate if the given object should pass the filter or not.
|
void |
setAnnotation(Annotation a)
Set the annotation this filter should match.
|
void |
setAnnotationId(int annotationId)
Set the annotation this filter should match.
|
public AnnotationFilter()
public AnnotationFilter(Annotation a)
public boolean evaluate(AnnotationSnapshot snapshot)
Filter
evaluate
in interface Filter<AnnotationSnapshot>
snapshot
- The object to evaluatepublic void setAnnotation(Annotation a)
a
- A specific annotation, or null to match any annotationpublic void setAnnotationId(int annotationId)
annotationId
- A specific annotation, or 0 to match any annotation