2.17.2: 2011-06-17

net.sf.basedb.core.snapshot
Class AnnotationTypeFilter

java.lang.Object
  extended by 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 (Wed, 14 Oct 2009) $

Field Summary
private  int annotationTypeId
           
 
Constructor Summary
AnnotationTypeFilter()
          Create a filter that matches all annotation types.
AnnotationTypeFilter(AnnotationType at)
          Create a filter that matches a specfic annotation type.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

annotationTypeId

private int annotationTypeId
Constructor Detail

AnnotationTypeFilter

public AnnotationTypeFilter()
Create a filter that matches all annotation types.


AnnotationTypeFilter

public AnnotationTypeFilter(AnnotationType at)
Create a filter that matches a specfic annotation type.

Method Detail

evaluate

public boolean evaluate(AnnotationSnapshot snapshot)
Description copied from interface: Filter
Evaluate if the given object should pass the filter or not.

Specified by:
evaluate in interface Filter<AnnotationSnapshot>
Parameters:
snapshot - The object to evaluate
Returns:
TRUE if the object passes the filter, FALSE otherwise

setAnnotationType

public void setAnnotationType(AnnotationType at)
Set the annotation type this filter should match.

Parameters:
at - A specific annotation type, or null to match any annotation type

2.17.2: 2011-06-17