xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: "Bradley S. Huffman" <hip AT cs.okstate.edu>
- To: xom-interest AT lists.ibiblio.org
- Subject: Re: [XOM-interest] Subclassing and check methods
- Date: Thu, 11 Mar 2004 23:34:42 -0600
"Bradley S. Huffman" writes:
> Elliotte Rusty Harold writes:
>
> > The fields can still be private. However the accessor/mutator methods
> > don't have to be final. They can call the superclass methods to make
> > their changes. As long as the fields remain private and the accessor
> > methods are final, this would not enable anyone to violate the
> > fundamental class invariant of well-formedness. Subclasses could
> > override insertChild, setLocalName, etc. without being able to bypass
> > the well-formedness checks.
>
> Unless they do
>
> private String myLocalName;
>
> public void setLocalName(String localName) {
> myLocalName = localName;
> }
>
> public String getLocalName() {
> return myLocalName;
> }
Hmm, what if only all getter where final? A subclasser could then pull a trick
like the one above, but not do much with it.
Brad
-
[XOM-interest] Last call warning,
Elliotte Harold, 03/11/2004
-
Re: [XOM-interest] Last call warning,
jcowan, 03/11/2004
-
[XOM-interest] Subclassing and check methods,
Elliotte Rusty Harold, 03/11/2004
-
Re: [XOM-interest] Subclassing and check methods,
Bradley S. Huffman, 03/12/2004
- Re: [XOM-interest] Subclassing and check methods, Bradley S. Huffman, 03/12/2004
-
Re: [XOM-interest] Subclassing and check methods,
Elliotte Rusty Harold, 03/12/2004
-
Re: [XOM-interest] Subclassing and check methods,
Bradley S. Huffman, 03/12/2004
- Re: [XOM-interest] Subclassing and check methods, Elliotte Rusty Harold, 03/12/2004
- Re: [XOM-interest] Subclassing and check methods, Elliotte Rusty Harold, 03/12/2004
-
Re: [XOM-interest] Subclassing and check methods,
jcowan, 03/12/2004
- Re: [XOM-interest] Subclassing and check methods, Elliotte Rusty Harold, 03/13/2004
- Re: [XOM-interest] Subclassing and check methods, John Cowan, 03/13/2004
-
Re: [XOM-interest] Subclassing and check methods,
Bradley S. Huffman, 03/12/2004
-
Re: [XOM-interest] Subclassing and check methods,
Bradley S. Huffman, 03/12/2004
-
Re: [XOM-interest] Subclassing and check methods,
Elliotte Rusty Harold, 03/12/2004
- Re: [XOM-interest] Subclassing and check methods, Bradley S. Huffman, 03/12/2004
- Re: [XOM-interest] Subclassing and check methods, John Cowan, 03/12/2004
-
[XOM-interest] Subclassing and check methods,
Elliotte Rusty Harold, 03/11/2004
-
Re: [XOM-interest] Last call warning,
jcowan, 03/11/2004
Archive powered by MHonArc 2.6.24.