"scott.stark(a)jboss.org" wrote : I'm not sure what the hooks are for
introducing an attachment or an annotation on jdk types like javax.management.ObjectName
are. ?
Something like this:
| public <T> void registerMapper(Class<T> clazz, MetaMapper<T>
metaMapper)
| {
| ClassInfo ci = configuration.getClassInfo(clazz);
| ci.setAttachment(MetaMapper.class.getName(), metaMapper);
| }
|
| MetaMapper<ObjectName> onMetaMapper = new ObjectNameMetaMapper();
| registerMapper(ObjectName.class, onMetaMapper);
|
You only need to be careful for transient ClassInfos,
since it's all weak (value) hash map in the background.
But for jdk classes this should stick in there forever. :-)
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4191493#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...