There already is an AnnotationInfo. Doesn't the inherrited TypeInfo.convertValue(Object value, boolean replaceProperties) come into play?
ann = (Annotation) AnnotationCreator.createAnnotation(annString, Thread.currentThread().getContextClassLoader());
I've added simple property replace to annotations def (the thing that was bothering Brian):
String annString = annotation; // TODO - JBMICROCONT-143 + any better way? if (replace) { annString = StringPropertyReplacer.replaceProperties(annString); } //FIXME [JBMICROCONT-99] [JBAOP-278] Use the loader for the bean? ann = (Annotation)AnnotationCreator.createAnnotation(annString, Thread.currentThread().getContextClassLoader());
<bean name="MyBeanReplace" class="org.jboss.test.kernel.config.support.MyObject"> <annotation>@org.jboss.test.kernel.config.support.SimpleAnnotation(name = "test.${test.property.value}.Name")</annotation> </bean>
MyObject mybean = ...; SimpleAnnotation ann = mybean.getClass().getAnnotation(SimpleAnnotation.class);