[jboss-user] [Microcontainer] - Re: Install from Annotations
alesj
do-not-reply at jboss.com
Tue Jun 23 09:51:30 EDT 2009
The matching annotation plugin is missing usage of this name:
| public class BeanAnnotationPlugin extends ClassAnnotationPlugin<Bean>
| {
| public static final BeanAnnotationPlugin INSTANCE = new BeanAnnotationPlugin();
|
| protected BeanAnnotationPlugin()
| {
| super(Bean.class);
| }
|
| protected List<? extends MetaDataVisitorNode> internalApplyAnnotation(ClassInfo info, Bean annotation, BeanMetaData beanMetaData)
| {
| AbstractBeanMetaData abmd = checkIfNotAbstractBeanMetaDataSpecific(beanMetaData);
|
| if (abmd.getAutowireType() == null)
| abmd.setAutowireType(annotation.autowireType());
| if (abmd.getMode() == null)
| abmd.setMode(annotation.mode());
| if (abmd.getErrorHandlingMode() == null)
| abmd.setErrorHandlingMode(annotation.errorHandlingMode());
| if (abmd.getAccessMode() == null)
| abmd.setAccessMode(annotation.accessMode());
|
| // we don't put bmd back to be inspected
| // since the changes we apply *here* don't really
| // trigger any change in metadata - all enums
| return null;
| }
| }
I did put this comment here
| public @interface Bean
| {
| /**
| * Get the bean's name.
| *
| * This is only meant to be used before
| * bean meta data is already installed
| * in Controller.
| *
| * @return bean's name
| */
| String name() default "";
|
But thinking about it more + your use case,
I'm not sure anymore why I left it out from the plugin.
You can create your temp @Bean annotation plugin and register it against BasicBeanMetaDataAnnotationAdapter.
I'll add this name usage + test if it breaks something.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4239423#4239423
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4239423
More information about the jboss-user
mailing list