
Signature
"Thomas:Fritsch$ops:de".replace(':','.').replace('$','@')
Thomas Fritsch schreef:
>> Thomas Fritsch schreef:
>>> An attempt to explain <?> is given in
[quoted text clipped - 11 lines]
>>
> Ah, thanks! So Class<?> is pretty much the same as Class.
Well, yes, it is the generified version. Class is the erasure type.
Read up on generics if this sounds unclear to you.
Also see
http://www.angelikalanger.com/GenericsFAQ/FAQSections/ProgrammingIdioms.html#Wha
t%20does%20the%20type%20parameter%20of%20class%20java.lang.Class%20mean?
shortened: http://tinyurl.com/hk39y
> A somewhat related question:
> How do I get the concrete semantic meaning of a <T> or <E> parameter
> found in the javadoc class declaration? For example in:
> public class Class<T> extends Object
>
> public interface Collection<E> extends Iterable<E>
You (almost) can’t. The information is erased. At runtime, it is an
Object. For details and tricks, browse the above site.
> Surely we can make clever guesses about what the <T> or <E> parameter in
> a particular class is intended to mean, by reading the javadoc of the
[quoted text clipped - 5 lines]
> public interface Collection<E> extends Iterable<E>
> @genericparam E the type of objects contained in this Collection
Most of the time, the E will be unknown at the moment the class is
written, thus nothing sensible can be said about it. Everything you
mention here is indeed in the documentation, and is sort of ‘evident’ as
it is the purpose of generics. Class is the noticeable exception.
H.
- --
Hendrik Maryns
==================
http://aouw.org
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html
Thomas Fritsch - 24 Apr 2006 16:39 GMT
> Thomas Fritsch schreef:
>> Surely we can make clever guesses about what the <T> or <E> parameter in
[quoted text clipped - 11 lines]
> mention here is indeed in the documentation, and is sort of ?evident? as
> it is the purpose of generics. Class is the noticeable exception.
The other noticeable exception from self-evidence is
public abstract class Enum <E extends Enum<E>>
But AFAIK that class is only for internal use by the compiler (as superclass
of all enum types). Hence incomprehensibility is no problem here. ;-)

Signature
"Thomas:Fritsch$ops.de".replace(':', '.').replace('$', '@')