classpath
[Top][All Lists]
Advanced

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

RE: Japitools 1.5 support tough design issue


From: Jeroen Frijters
Subject: RE: Japitools 1.5 support tough design issue
Date: Wed, 7 Sep 2005 15:52:04 +0200

Stuart Ballard wrote:
> I have another question about Java generics behavior and hopefully
> people here are expert enough on the subject to be able to answer
> it...
> 
> Does Java draw any distinction at all between, say, java.util.List and
> java.util.List<Object>?

Depends on what you mean by "Java" <g>. The JVM (outside of reflection
support) has absolutely no knowledge of generics, so as far as the JIT
and EE are concerned both are identical.

> In other words, will there be any difference in bytecode between:
> class MyList implements List
> and
> class MyList implements List<Object>

The <Object> part is a separate attribute in the class file, but that
attribute is only used for reflection and by Java compilers.

> or between
> List list = new ArrayList();
> and
> List<Object> list = new ArrayList<Object>();

No difference at all, not even an attribute.

Regards,
Jeroen




reply via email to

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