With this addition to field injection
(
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=131615), KernelScopeInfo
needs changing of the way we add instance annotations.
| Set<PropertyInfo> propertyInfos = beanInfo.getProperties();
| if (propertyInfos != null && propertyInfos.size() > 0)
| {
| for (PropertyInfo propertyInfo : propertyInfos)
| {
| if (propertyInfo.getName().equals(propertyMetaData.getName()))
| {
| MethodInfo methodInfo = propertyInfo.getGetter();
| if (methodInfo != null)
| addAnnotations(classloader, mutable, methodInfo,
propertyAnnotations);
| methodInfo = propertyInfo.getSetter();
| if (methodInfo != null)
| addAnnotations(classloader, mutable, methodInfo,
propertyAnnotations);
| }
| }
| }
|
We can add getGetterSignature and getSetterSignature on the PropertyInfo. Where in the
case of FieldPI we would return FieldSignature for getSetterSignature and null for
getGetterSignature.
But that would mean introducing cyclic dependency on MDR project. :-(
And the property lookup code should be changed to use BeanInfo.getProperty(name), unless
we want to add annotations to all equally named propertys.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4137015#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...