Here I sit with a patch for the codegenerator and know sourceforge is down
for maintanence - bummer!

Well, you get it here as an attachment instead then, so I can go happily to
bed :)

Yappering starts here:

This patch solves the problems regarding the subclass not knowing about the
supers fields.
It does now.

This patch both cleans up some parts of the codegen, but also makes it
obvious that it
could be even cleaner :) I suggest we just use this patch for 1.2.1 (it its
better than the current one),
and when we (read: Gavin) decides to integrate the metattribute patch (or
not) - Then I'll do some
major cleaning up in the codegenerator. (note to Gavin, if you accept the
idea about metaattribute's then
do not apply my earlier posted metaattriubte patch! I'll like to do the
refactoring and metaattribute in one
go ...and besides the old patch will not work without some work when this
one gets applied :)

Changes made:

Made some  small (non-vital) changes to the codegen test.hbm.xml files to
make them more test friendly (e.g. all classes will know end in codegen.test
instead of default package as some did before)

Removed the adding of the implementing class name for collections as the
codegenerator does not
generate code that refer to this class (It is only used in the
initialisation field of Field - and this field  is never
accessed from the BasicRender (or anywhere else that matters))
(Primarily done to avoid being told by Eclipse that I have unused imports in
my code :)

Refactored constructor generation so it is (much) cleaner and simpler
(Primarily done to make it easier to add support for superclasses fields in
constructors of subclasses)

Discovered "bug" regarding the constructor arguments referencing to the
concrete types instead of their proxy/interface.
Came to think: Is the current behavior correct ? Should get/sets method for
e.g. User use the interface IUser or the concrete User ?

While refactoring it became obvious that the class ClassName and its usage
could need another
good old refactoring - but that i'll do later.



Attachment: codegencons.patch
Description: Binary data

Reply via email to