[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: enums, generics and other animals

alesj do-not-reply at jboss.com
Fri Mar 7 13:40:52 EST 2008


"adrian at jboss.org" wrote : Why have you created a package called "enums"?
  | 
Now you complain. :-)
I proposed the name in the first few posts.
Just following the silence rule. ;-)

"adrian at jboss.org" wrote : 
  | Would you create a package called "classes"? :-)
  | 
Why are then plenty of interfaces packages (not in MC, but 'around')?
And the annotations, like you figured out your self.
And I didn't start with those. ;-)

"adrian at jboss.org" wrote : 
  | Either put the enums in the annotations package or create a package called model or something.  This package would also contain callback interfaces referenced (like the ScopeFactory in the metadata repository) so calling it "enums" is plain wrong.
  | 
OK, model it is.

"adrian at jboss.org" wrote : 
  | 1) Why do you have class names as strings in the annotations?
  | To be able to read the annotations at all the classloader must exist
  | so there's no problem with letting the users specify classes.
  | 
Bug. :-)
That's why I called the commit initial.

"adrian at jboss.org" wrote : 
  | 2) How can the Factory(Method) annotations work?
  | 
  | These are used at object construction. You don't know the type until
  | the object is constructed so how can read the annotations? :-)
  | 
Why should the object be constructed?
Isn't class enough, to read off the annotations?

@Factory does what our constructor xml factory does as well.
It just happens to be on the class rather than on the constructor.
If the factoryClass is not specified, the class on which it is defined is used.

@FactoryMethod is probably an extension, but functionally similar to @Factory with class and method specified.
You scan the static methods which are annotated to be factory methods.

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

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



More information about the jboss-dev-forums mailing list