Yes, this is somehow expected.
PropertyMD --> ValueMD --> BeanMD --> inner bean --> dependency
AbstractValueMD::getChildren doesn't distinguish between plain properly value and
metadata value.
Normally MC metadata should be hidden for POJOs,
so I wouldn't put too much effort into this --> would go with a wrapper.
Perhaps you can add this to BMDBuilder:
| <T> T wrap(T impl, Class<T> clazz)
| {
| return new MetaDataWrapper<T>(impl, clazz);
| }
|
| public class MetaDataWrapper<T>
| {
| T impl;
| Class<T> clazz;
|
| public MetaDataWrapper(T impl, Class<T> clazz) { ... }
|
| public T unwrap() { return impl; }
| }
|
which hides the actual metadata in generic way.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4263812#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...