[hibernate-dev] hbm2doc with inner-classes

Mark Hobson markhobson at gmail.com
Mon Oct 30 09:04:35 EST 2006


On 24/10/06, Max Rydahl Andersen <max.andersen at jboss.com> wrote:
> > I'm not entirely sure of the distinction between getShortName and
> > getDeclarationName - the latter seems to account for meta attributes
> > whereas the former doesn't.  Also, changing getJavaTypeName requires
> > altering the behaviour of ImportContextImpl such that:
> >
> >    ImportContextImpl.importType("a.b.X.Y") == "X.Y" (import a.b.X)
>
> Again, how do you know wether a name is a class or an inner class?

Looking at the uses of ImportContext, the FQCN being passed into
importType is of the form that is return by Class.getName.  For
inner-classes, this uses the dollar syntax, e.g. "a.b.X$Y".  If this
is definitely the case, then we can change ImportContextImpl to
support inner-classes as described above.

I'm happy to patch this, but was curious about any knock-on effects.
I've tried running the tools tests but get a heap of errors - is there
any special configuration I'm unaware of for them to pass?

Mark



More information about the hibernate-dev mailing list