You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Edwin Wiles <ew...@cox.rr.com> on 2001/01/30 04:49:11 UTC
Newbie Alert! Why are the classes declared final?
Okay, this is my first message to the list, and the only reason I'm
posting it is because I (a) can't search the mailing list archives, and
(b) I can't seem to find an answer to my question anywhere else that I
CAN search.
To wit, Why are so many of the DOM classes marked "final"?
I know what "final" does, it keeps you from deriving new classes based
on them. Unfortunately, that's exactly what I have needed to do in the
past, and actually ended up NOT using DOM because I couldn't.
While I know that I could declare a series of 'wrapper' classes that
just pass the calls along, that's an awful lot of work for very little
return. If the classes were simply not declared "final", I could extend
them directly.
Once I get a reasonable answer (hopefully soon) as to why extension is
not permitted, I'll probably go away and stop bothering y'all. Unless I
find the discussions interesting. :)
Personal Note: I've been in the computing industry as a software
engineer for over 13 years. I've been using Java for at least three
years. I've tried to use DOM for various activities for at least two
years. So I have at least some clue.
With a Hopeful Look,
Edwin Wiles
Re: Newbie Alert! Why are the classes declared final?
Posted by Andy Clark <an...@apache.org>.
Edwin Wiles wrote:
> Personal Note: I've been in the computing industry as a software
> engineer for over 13 years. I've been using Java for at least three
> years. I've tried to use DOM for various activities for at least two
> years. So I have at least some clue.
Put that experience to use and submit the CVS patches that
change the classes to non-final. :)
--
Andy Clark * IBM, TRL - Japan * andyc@apache.org
Re: Newbie Alert! Why are the classes declared final?
Posted by Edwin Wiles <ew...@cox.rr.com>.
Ted,
Since Arnaud is already taking care of it, I won't be touching the
code; though I will be using CVS to get the latest-greatest. No need to
panic! <grin>
Edwin
Ted Leung wrote:
>
> Whoa. I thought you were only talking about DOM classes.
>
> If you are going to unfinal all the classes I think that needs to
> be done at a more leisurely pace, and with performance measurements
> to make sure that performance doesn't suffer.
>
> Ted
Re: Newbie Alert! Why are the classes declared final?
Posted by Arnaud Le Hors <le...@us.ibm.com>.
I wrote:
>
> Ok, it's fixed. sed rules :-)
Let's be clear, this is only for HTML DOM.
--
Arnaud Le Hors - IBM Cupertino, XML Strategy Group
Re: Newbie Alert! Why are the classes declared final?
Posted by Arnaud Le Hors <le...@us.ibm.com>.
Ok, it's fixed. sed rules :-)
--
Arnaud Le Hors - IBM Cupertino, XML Strategy Group
Re: Newbie Alert! Why are the classes declared final?
Posted by Ted Leung <tw...@sauria.com>.
Whoa. I thought you were only talking about DOM classes.
If you are going to unfinal all the classes I think that needs to
be done at a more leisurely pace, and with performance measurements
to make sure that performance doesn't suffer.
Ted
----- Original Message -----
From: "Edwin Wiles" <ew...@cox.rr.com>
To: <xe...@xml.apache.org>
Sent: Tuesday, January 30, 2001 2:47 PM
Subject: Re: Newbie Alert! Why are the classes declared final?
> Arnaud Le Hors wrote:
> > I'll just mention that I don't see any final class in the current
> > implementation...
>
> Ummm... I just downloaded 1.2.3 recently, and this is just a small part
> of what I see when I go looking for "final[\t ]+class":
>
> ----------
> org/apache/html/dom/HTMLAnchorElementImpl.java:public final class
> HTMLAnchorElementImpl
> org/apache/html/dom/HTMLAppletElementImpl.java:public final class
> HTMLAppletElementImpl
> org/apache/html/dom/HTMLAreaElementImpl.java:public final class
> HTMLAreaElementImpl
> org/apache/html/dom/HTMLBaseElementImpl.java:public final class
> HTMLBaseElementImpl
> org/apache/html/dom/HTMLBaseFontElementImpl.java:public final class
> HTMLBaseFontElementImpl
> org/apache/html/dom/HTMLBodyElementImpl.java:public final class
> HTMLBodyElementImpl
> org/apache/html/dom/HTMLBRElementImpl.java:public final class
> HTMLBRElementImpl
> org/apache/html/dom/HTMLButtonElementImpl.java:public final class
> HTMLButtonElementImpl
> org/apache/html/dom/HTMLCollectionImpl.java:final class
> HTMLCollectionImpl
> org/apache/html/dom/HTMLDirectoryElementImpl.java:public final class
> HTMLDirectoryElementImpl
> org/apache/html/dom/HTMLDivElementImpl.java:public final class
> HTMLDivElementImpl
> ---------
>
> There are also large swathes of 'final class' in org/apache/xerces/*.
>
> Per my prior message, it is only a matter of time before ALL "final
> class" definitions are changed to simply "class".
>
> Hopefully Helpful,
> Edwin
----------------------------------------------------------------------------
----
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
Re: Newbie Alert! Why are the classes declared final?
Posted by Arnaud Le Hors <le...@us.ibm.com>.
Ok, I was only talking about the Core DOM, I basically never touched the
HTML DOM so I didn't think about it...
I can easily fix that. Hold on...
--
Arnaud Le Hors - IBM Cupertino, XML Strategy Group
Re: Newbie Alert! Why are the classes declared final?
Posted by Edwin Wiles <ew...@cox.rr.com>.
Arnaud Le Hors wrote:
> I'll just mention that I don't see any final class in the current
> implementation...
Ummm... I just downloaded 1.2.3 recently, and this is just a small part
of what I see when I go looking for "final[\t ]+class":
----------
org/apache/html/dom/HTMLAnchorElementImpl.java:public final class
HTMLAnchorElementImpl
org/apache/html/dom/HTMLAppletElementImpl.java:public final class
HTMLAppletElementImpl
org/apache/html/dom/HTMLAreaElementImpl.java:public final class
HTMLAreaElementImpl
org/apache/html/dom/HTMLBaseElementImpl.java:public final class
HTMLBaseElementImpl
org/apache/html/dom/HTMLBaseFontElementImpl.java:public final class
HTMLBaseFontElementImpl
org/apache/html/dom/HTMLBodyElementImpl.java:public final class
HTMLBodyElementImpl
org/apache/html/dom/HTMLBRElementImpl.java:public final class
HTMLBRElementImpl
org/apache/html/dom/HTMLButtonElementImpl.java:public final class
HTMLButtonElementImpl
org/apache/html/dom/HTMLCollectionImpl.java:final class
HTMLCollectionImpl
org/apache/html/dom/HTMLDirectoryElementImpl.java:public final class
HTMLDirectoryElementImpl
org/apache/html/dom/HTMLDivElementImpl.java:public final class
HTMLDivElementImpl
---------
There are also large swathes of 'final class' in org/apache/xerces/*.
Per my prior message, it is only a matter of time before ALL "final
class" definitions are changed to simply "class".
Hopefully Helpful,
Edwin
Re: Newbie Alert! Why are the classes declared final?
Posted by Arnaud Le Hors <le...@us.ibm.com>.
(Ignoring Ted's biaised comment ;-)
I'll just mention that I don't see any final class in the current
implementation...
--
Arnaud Le Hors - IBM Cupertino, XML Strategy Group
Re: Newbie Alert! Why are the classes declared final?
Posted by Edwin Wiles <ew...@cox.rr.com>.
Okay, I'll see if I can talk my bosses into letting me do that. If I
can, it'll be fairly soon. If I can't, it'll take longer.
Ted Leung wrote:
>
> The original rationale behind the use of final was a boost
> in performance.
>
> Since it's clear that the DOM will never be performant, that
> argument doesn't hold water anymore. So I agree with
> Andy. Submit a set of non-final patches. I promise to
> commit them.
>
> Ted
Re: Newbie Alert! Why are the classes declared final?
Posted by Ted Leung <tw...@sauria.com>.
The original rationale behind the use of final was a boost
in performance.
Since it's clear that the DOM will never be performant, that
argument doesn't hold water anymore. So I agree with
Andy. Submit a set of non-final patches. I promise to
commit them.
Ted
----- Original Message -----
From: "Edwin Wiles" <ew...@cox.rr.com>
To: "xerces j dev" <xe...@xml.apache.org>
Sent: Monday, January 29, 2001 7:49 PM
Subject: Newbie Alert! Why are the classes declared final?
> Okay, this is my first message to the list, and the only reason I'm
> posting it is because I (a) can't search the mailing list archives, and
> (b) I can't seem to find an answer to my question anywhere else that I
> CAN search.
>
> To wit, Why are so many of the DOM classes marked "final"?
>
> I know what "final" does, it keeps you from deriving new classes based
> on them. Unfortunately, that's exactly what I have needed to do in the
> past, and actually ended up NOT using DOM because I couldn't.
>
> While I know that I could declare a series of 'wrapper' classes that
> just pass the calls along, that's an awful lot of work for very little
> return. If the classes were simply not declared "final", I could extend
> them directly.
>
> Once I get a reasonable answer (hopefully soon) as to why extension is
> not permitted, I'll probably go away and stop bothering y'all. Unless I
> find the discussions interesting. :)
>
> Personal Note: I've been in the computing industry as a software
> engineer for over 13 years. I've been using Java for at least three
> years. I've tried to use DOM for various activities for at least two
> years. So I have at least some clue.
>
> With a Hopeful Look,
> Edwin Wiles
----------------------------------------------------------------------------
----
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org