arrays of generic types

P

Peter Ashford

Eclipse tells me that arrays of generic types are not legal, e.g.: it
won't allow the following:

QuadTree<MyNodeType> [] allQuadTrees;

Anyone know why this is the case?
 
T

Tor Iver Wilhelmsen

Peter Ashford said:
Eclipse tells me that arrays of generic types are not legal, e.g.: it
won't allow the following:

QuadTree<MyNodeType> [] allQuadTrees;

Do you use a version of Eclipse that supports JDK 1.5/5.0?

From http://www.eclipse.org/jdt/index.html:

"J2SE 1.5 support was *not* officially scheduled for Eclipse 3.0
release, since J2SE 1.5 was not finalized before 3.0 release date,
and we did not want to jeopardize the 3.0 release by integrating
beta quality tooling. In parallel to the 3.0 effort, we were still
implementing an experimental version of JDT Core with 1.5 support
(mostly focusing on adding generics support to Eclipse Java
compiler). You may find details and previews of our ongoing effort
(codename "Cheetah") in our update area."

However, it seems this "experimental" support has been improved in
3.0.1 which is the latest public release.
 
I

IchBin

Peter said:
Eclipse tells me that arrays of generic types are not legal, e.g.: it
won't allow the following:

QuadTree<MyNodeType> [] allQuadTrees;

Anyone know why this is the case?
Depends on what version of eclipse you are running. Also they do not
have full JDK 1.5 support yet.

Better to Post to Eclipse newsgroup: news.eclipse.org's eclipse.platform

--


Thanks in Advance...
IchBin
__________________________________________________________________________

'Laughter is inner jogging'
- Norman Cousins, editor and author (1915-1990)
 
P

Peter Ashford

Tor said:
Eclipse tells me that arrays of generic types are not legal, e.g.: it
won't allow the following:

QuadTree<MyNodeType> [] allQuadTrees;


Do you use a version of Eclipse that supports JDK 1.5/5.0?

From http://www.eclipse.org/jdt/index.html:

"J2SE 1.5 support was *not* officially scheduled for Eclipse 3.0
release, since J2SE 1.5 was not finalized before 3.0 release date,
and we did not want to jeopardize the 3.0 release by integrating
beta quality tooling. In parallel to the 3.0 effort, we were still
implementing an experimental version of JDT Core with 1.5 support
(mostly focusing on adding generics support to Eclipse Java
compiler). You may find details and previews of our ongoing effort
(codename "Cheetah") in our update area."

However, it seems this "experimental" support has been improved in
3.0.1 which is the latest public release.

I'm using the cheetah plugin which provides generics support. Eclipse
is not complaining about the use of generics - my code is littered with
it - it is complaing just about arrays of generic types.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top