classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Class.getSuperclass comment bug


From: John Keiser
Subject: Re: Class.getSuperclass comment bug
Date: Thu, 5 Jul 2001 11:25:50 -0600

From: "Patrick Doyle" <address@hidden>
>
> In vm/reference/java/lang/Class.java, the comments for the getSuperclass
> method say this:
>
>   Get the direct superclass of this class.  If this is
>   an interface, it will get the direct superinterface.
>
> However, there is no such thing as "the direct superinterface".  There can
> be any number of direct superinterfaces for any class or interface.
>
> The JDK docs say this:
>
>   If this Class represents either the Object class, an interface, a
>   primitive type, or void, then null is returned. If this object
>   represents an array class then the Class object representing the Object
>   class is returned.
>
> AFAIK, this has been the case since JDK 1.0.
>

Reading the JLS, you're 100% right.  I suppose I was under the impression
that an interface could only extend one other interface, but there's really
no reason for that.  Next thing to do is to test whether or not this is true
with Japhar+Classpath :)

--John Keiser





reply via email to

[Prev in Thread] Current Thread [Next in Thread]