Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > How is tag interface functionality implemented in Java ?

Reply
Thread Tools

How is tag interface functionality implemented in Java ?

 
 
Patricia Shanahan
Guest
Posts: n/a
 
      09-08-2008
Lasse Reichstein Nielsen wrote:
....
> The clone() method also checks for Clonable-implementation on each
> class in the inheritance chain, and only copies the fields of those
> that do implement Clonable. If somewhere up the chain there is a class
> that doesn't implement Clonable, then it stops its copying there.

....

That sounds very strange, and directly conflicts with the API
documentation for Object's clone method. The only condition under which
it is documented to throw CloneNotSupportedException is "if the class of
this object does not implement the interface Cloneable". It says nothing
at all about the classes of this object's superclasses.

In addition, a programmer can specifically choose to throw it from an
overriding clone method. That technique covers the case of a class that
should not be cloned but extends a class that is Cloneable.

Patricia

 
Reply With Quote
 
 
 
 
Lasse Reichstein Nielsen
Guest
Posts: n/a
 
      09-08-2008
EJP <(E-Mail Removed)> writes:

> Lasse Reichstein Nielsen wrote:
>> The clone() method also checks for Clonable-implementation on each
>> class in the inheritance chain, and only copies the fields of those
>> that do implement Clonable. If somewhere up the chain there is a class
>> that doesn't implement Clonable, then it stops its copying there.

>
> Really? Where does it say that? What does it do with the members which
> don't implement Cloneable? How come the description in the Javadoc for
> java.lang.Object.clone() says something completely different?
>
> This is fantasy folks.


Argh, yes, my mistake. I was confuzing it with Serializable.
My bad.

/L
--
Lasse Reichstein Nielsen
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
How is tag interface functionality implemented in Java continued ...? Lew Java 7 09-08-2008 05:58 AM
how do u invoke Tag b's Tag Handler from within Tag a's tag Handler? shruds Java 1 01-27-2006 03:00 AM
Reflection of a implemented interface homecurr@yahoo.com Java 1 05-20-2004 09:29 PM
one interface implemented by two seperate "modules" Raffael Vogler Java 2 12-18-2003 08:23 AM



Advertisments