1 21 package com.db4o.config.annotations.reflect; 22 23 import java.lang.annotation.Annotation ; 24 import java.lang.reflect.AnnotatedElement ; 25 26 import com.db4o.config.annotations.UpdatedDepth; 27 28 31 public class UpdatedDepthFactory implements Db4oConfiguratorFactory { 32 33 public Db4oConfigurator configuratorFor(AnnotatedElement element, 34 Annotation annotation) { 35 36 if (!annotation.annotationType().equals(UpdatedDepth.class)) { 37 return null; 38 } 39 String className=null; 40 41 if(element instanceof Class ) { 42 className=((Class )element).getName(); 43 } 44 45 int updateDepth= ((UpdatedDepth) annotation).value(); 46 return new UpdatedDepthConfigurator(className, updateDepth); 47 } 48 49 } 50 | Popular Tags |