This content has been marked as final.
Show 7 replies
-
1. Re: FYI: Latest ClassInfo changes.
alesj Feb 2, 2007 12:34 PM (in response to adrian.brock)"adrian@jboss.org" wrote:
BeanInfo property accessors
I've fixed this new code to delegate to the PropertyInfo
such that the PropertyInfo impl can decide how to get/set the property.
I've rewritten AttributeDispatchContext for AbstractKernelControllerContext to use this.
What about with method / operation invocation (InvokeDispatchContext)?
Will we be moving this to BeanInfo notion as well? Or is it already there? -
2. Re: FYI: Latest ClassInfo changes.
alesj Feb 2, 2007 3:31 PM (in response to adrian.brock)"alesj" wrote:
What about with method / operation invocation (InvokeDispatchContext)?
Will we be moving this to BeanInfo notion as well? Or is it already there?
:-(
Blind me. I don't know what I was looking at.
Of course it's all there.
So I've changed the invoke on AbstractKernelControllerContext.
Should I change get/set invocation in Actions as well?
Or slowly move all our pojo code to BeanInfo / PropertyInfo notion? -
3. Re: FYI: Latest ClassInfo changes.
adrian.brock Feb 6, 2007 11:24 AM (in response to adrian.brock)"alesj" wrote:
Should I change get/set invocation in Actions as well?
Or slowly move all our pojo code to BeanInfo / PropertyInfo notion?
The BeanInfo stuff (deliberately) doesn't understand the Property
abstraction from the BeanMetaData so you still need an abstraction
over the top of it to covert the property metadata to an Object.
This is what is currently in the KernelConfigurator.
Also in some places (like instantiation) there is the option to use
a constructor or a factory. Only the constructor is supported by the BeanInfo. -
4. Re: FYI: Latest ClassInfo changes.
alesj Feb 6, 2007 12:22 PM (in response to adrian.brock)"adrian@jboss.org" wrote:
Only the constructor is supported by the BeanInfo.
I had to loosen this - added 'boolean strict' to Config.getMethodJoinpoint - in order to support Scott's factory construction in JavaBean2.
See AbstractBeanInfo.invoke. -
5. Re: FYI: Latest ClassInfo changes.
adrian.brock Feb 6, 2007 12:49 PM (in response to adrian.brock)That doesn't look very good.
You don't want to invoke a static method on a bean by mistake.
I'd rather see it search for a static method only if the "bean" parameter is null.
But then these methods should really be throwing an exception if you pass a null bean.
If you really want to invoke a static method, you should be using
beanInfo.getClassInfo() since you are no longer in the bean abstraction. -
6. Re: FYI: Latest ClassInfo changes.
adrian.brock Feb 6, 2007 12:50 PM (in response to adrian.brock)I don't see a problem with having a seperate invokeStatic() that does the plumbing for you
to make things easy. -
7. Re: FYI: Latest ClassInfo changes.
alesj Feb 6, 2007 12:56 PM (in response to adrian.brock)Ok, I'll add the static notion to BeanInfo.
Should I remove the loose modifier strictness in Config method lookup?