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