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.StoredTransientFields; 27 28 31 public class StoredTransientFieldsFactory implements Db4oConfiguratorFactory { 32 33 public Db4oConfigurator configuratorFor(AnnotatedElement element, 34 Annotation annotation) { 35 if (!annotation.annotationType().equals(StoredTransientFields.class)) { 36 return null; 37 } 38 String className=null; 39 40 if(element instanceof Class ) { 41 className=((Class )element).getName(); 42 } 43 44 boolean value= ((StoredTransientFields) annotation).value(); 45 return new StoredTransientFieldsConfigurator(className, value); 46 } 47 48 } 49 | Popular Tags |