[jboss-dev-forums] [Design of POJO Server] - Re: Replacing system properties in metadata
alesj
do-not-reply at jboss.com
Fri Jun 6 07:33:33 EDT 2008
"adrian at 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#4156275
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4156275
More information about the jboss-dev-forums
mailing list