[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Field injection

adrian@jboss.org do-not-reply at jboss.com
Fri Mar 14 11:25:40 EDT 2008


"alesj" wrote : "adrian at jboss.org" wrote : 
  |   | This should have a BeanInfo with one property which is a FieldPropertyInfo
  |   | 
  | What about if the bean is in ALL or FIELDS mode and the property has just setter or just getter?
  | OK, there should be some kind of CombinedPropertyInfo.
  | 

I don't know, I'm not deep in the implementation details and don't want to be. 
I have my own work to do. :-)

If you think there is a policy choice to be made then let
the user decide with a addtional enum value.

Don't mix policy and implementation! :-)

anonymous wrote : 
  | The real question is, should I also replace the existing AbstractPropertyInfo in AbstractBeanInfo.properties or just in AbstractBeanInfo.propertiesByName?


I know you're probably scared of me telling you did it wrong after the fact,
but now I'll tell you that you are asking a stupid question before the fact. :-)

Isn't it obvious that PropertyInfo is the contract and AbstractPropertyInfo
is an implementation detail?

There should be some refactoring like;

  | public abstract class AbstractPropertyInfo implements PropertyInfo { String name }
  | public class StandardPropertyInfo extends AbstractPropertyInfo { MethodInfo getter, MethodInfo setter }
  | public class FieldPropertyInfo extends AbstractPropertyInfo { FieldInfo field }
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4136735#4136735

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4136735



More information about the jboss-dev-forums mailing list