On Mon, 28 Mar 2005 14:24:24 -0500, Laran Evans <[EMAIL PROTECTED]> wrote:
> Am I correct in my interpretation that:
> 
> When A extends B then A holds a Reference to A.
> When A implements B then A is an Extent of B.
> 
> ???
> 
> I'm having a bear of a time getting my inheritance working properly,
> especially when "class C extends B implements A".
> 
> Any advice would be appreciated.

I'm not entirely sure that I understand what you're asking here.
Both "extends" and "implements" are Java keywords used for the same
thing: inheritance. They differ only in that extends can only be used
with classes whereas implements can only be used with interfaces.
E.g., when A extends B then B must be a class (though it might be
abstract) and when A implements C then C must be an interface.

OJB does not care either way, for both you would use "extents" (note
the difference to extends) which is the inverse, i.e. you would say
that A has an extent B if B extends A (when A is a class) or B
implements A (when A is an interface).
You can have class-descriptors for both interfaces and classes, you
only have to be careful when OJB tries to instantiate
interfaces/abstract classes in which case you have to use
factory-class+factory-method to define the factory method that creates
the concrete instance.

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to