Spiral Arm Logo

Richard's technical notes

Wednesday, December 13, 2006

Generics in Comments

For a project I'm involved in that is stuck using JDK 1.4, I've found doing this soothing:

List/*<Stuff>*/ getStuff();

It's documentation, and gives me the hope that one day I can remove the comments for this particular project.

2 Comments:

Anonymous Dominic Mitchell said...

Which reminds me of a similar issue: Do you know how to use generics with JavaDoc? I had a quick look today, but couldn't figure it out. I tried {@link List<String>} but that just got me warnings from the javadoc tool...

10:25 PM  
Anonymous Tom Hawtin said...

Richard> That's what I started doing almost ten years ago...

Dominic> The interface is List. There is no List<String> method. More interesting is a method such as void fn(List<String>), which presumably uses the erasure (but not tested that).

8:22 PM  

Post a Comment

<< Home