1 /* 2 * Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com 3 * The software in this package is published under the terms of the CPAL v1.0 4 * license, a copy of which has been included with this distribution in the 5 * LICENSE.txt file. 6 */ 7 package org.mule.util.scan.annotations; 8 9 import java.lang.annotation.Annotation; 10 11 /** 12 * Simply filters for annotations that match the annotation class 13 */ 14 public class AnnotationTypeFilter implements AnnotationFilter 15 { 16 private Class<? extends Annotation> annotation; 17 18 public AnnotationTypeFilter(Class<? extends Annotation> annotation) 19 { 20 this.annotation = annotation; 21 } 22 23 public boolean accept(AnnotationInfo info) 24 { 25 return info.getClassName().equals(annotation.getName()); 26 } 27 }