Class AnnotationFilter

  • All Implemented Interfaces:
    Filter<AnnotationSnapshot>

    public class AnnotationFilter
    extends Object
    implements 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 Detail

      • annotationId

        private int annotationId
    • Constructor Detail

      • AnnotationFilter

        public AnnotationFilter()
        Create a filter that matches all annotations.
      • AnnotationFilter

        public AnnotationFilter​(Annotation a)
        Create a filter that matches a specfic annotation.
    • 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
      • setAnnotation

        public void setAnnotation​(Annotation a)
        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