On Tue, 2008-11-04 at 05:48 +0200, Serkan Kaba wrote:
> I recreated defs files with demuxer,redid my changes on them and pushed
> those 2 branches. I'm waiting to hear your comments on those.
Sure! This is terrific work, Serkan. I'll look tonight.
> Also I have a question. It seems to me that we have to add a Plumbing class for
> each module and I did that in those 2 branches. Is there a better way
> that I miss, currently?
No, what you did is fine. It's just something you take 10 seconds to
hand craft. Done once, that's it, done forever.
Having a Plumbing class in each package is just one of the many things
that we do machinery-wise as a part of engineering things so that
internals are not publicly visible.
Most of the time Java is sensible about this sort of thing, but it would
have been a hell of a lot easier if there was a "library" visibility
level. There isn't, but to ensure that package and protected visibility
can be leveraged to the max elsewhere, sometimes little funnies like
Plumbing in each package were necessary. Remember, it's actually all
about translation layer classes being able to see the protected
pointerOf() and numOf() from the top of the Plumbing hierarchy. That's
the real point. If I recall correctly, having the [often empty] package
one meant that the code generator was easier. It just kinda worked out
that way. Srichand or Vreixo could correct me, I'm sure.
(as it happens, it also came up that such classes were a great place to
put little package specific custom overrides; the Plumbing in
org.gnome.gdk has a boxedFor() that handles a challenging corner case.
Quite useful)
AfC
Sydney
|