"adrian(a)jboss.org" wrote :
| Then we could add something to MetaDataRetrievalToMetaDataBridge
| that does the replacement, e.g.
|
|
| |
| | public <T extends Annotation> T getAnnotation(Class<T>
annotationType)
| | {
| | if (annotationType == null)
| | throw new IllegalArgumentException("Null annotationType");
| | AnnotationItem<T> item =
retrieval.retrieveAnnotation(annotationType);
| | if (item == null)
| | return null;
| | - return item.getValue();
| | + T result = item.getValue();
| | + if (annotationType.hasAnnotation(Replaceable.class))
| | + result = checkReplaceable(result);
| | + return result;
| | }
| |
| Similar code would be required for getAnnotations()
If we're about to do this, then it should be done on AnnotationItem, since annotations
can also come from MetaData::get(Local)MetaData(s).
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4156275#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...