1 package jfun.yan.nuts.annotations; 2 import java.beans.IntrospectionException ; 3 import java.lang.annotation.Annotation ; 4 5 import jfun.util.beans.BeanType; 6 import jfun.yan.FilteredPropertiesInjector; 7 import jfun.yan.PropertiesInjector; 8 import jfun.yan.util.Utils; 9 10 16 public class AnnotationFilteredPropertiesInjector 17 extends FilteredPropertiesInjector{ 18 19 27 public static PropertiesInjector instance(Class type, 28 Class <? extends Annotation > annotation) 29 throws IntrospectionException { 30 final BeanType bt = Utils.toBeanType(type); 31 return new AnnotationFilteredPropertiesInjector(bt, annotation); 32 } 33 38 public AnnotationFilteredPropertiesInjector(final BeanType btype, 39 final Class <? extends Annotation > annotation){ 40 super(btype, new AnnotationMemberPredicate(annotation)); 41 } 42 } 43 | Popular Tags |