[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Moving microcontainer -> kernel

adrian@jboss.org do-not-reply at jboss.com
Tue Jun 2 10:32:09 EDT 2009


"david.lloyd at jboss.com" wrote : 
  | 
  |   | public static BeanMetaDataBuilder createBuilder(String name, String bean)
  |   | 
  | 
  | This just makes no sense.  One of those parameters is the name of the bean associated with the BeanMetaData, the other is the name of the class.  But which is which?  I get it wrong about half the time.
  | 

This must be a bad example? The javadoc tells you which is which.

If you posted all the code;

  |    /**
  | 
  |     * Create builder from name and bean.
  | 
  |     *
  | 
  |     * @param name bean name
  | 
  |     * @param bean bean class name
  | 
  |     * @return new Builder
  | 
  |     */
  | 
  |    public static BeanMetaDataBuilder createBuilder(String name, String bean)
  | 
  |    {
  | 
  |       return BeanMetaDataBuilderFactory.createBuilder(name, bean);
  | 
  |    }
  | 
  | 

Parameter names have no meaning in java anyway - it being a positional language - so they could be called x and y. This is "Humpty dumpty" again.

"bean" is actually the name of the class on BeanMetaData because you can't have
a get/setClass() - it already means something else in java.lang.Object.

Anyway, "String bean" is kind of funny, even if it wasn't an intentional joke by Ales. :-)
http://en.wikipedia.org/wiki/Green_beans

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

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



More information about the jboss-dev-forums mailing list