Here is the java newbie again.  Just when I was thinking I had the
vaugest handle on things up pops parameterized types.  The GWT 1.5
Serializable docs say that the "@gwt.typeArgs" is depreciated in favor
of parameterized types.  I'm not seeing a definative guide to using
them though.

In my case, in a 1.4 app I was using:

package edu.uiuc.itg.client;

import java.util.HashMap;
import java.util.Map;

public class QueryParameters
{
    Map map = new HashMap();

    public QueryParameters()
    {
        String search = getQueryString();
        if ((search != null) && (search.length() > 0))
        {
            String[] nameValues = search.substring(1).split("&");
            for (int i = 0; i < nameValues.length; i++)
            {
                String[] pair = nameValues[i].split("=");
                map.put(pair[0], pair[1]);
            }
        }
    }
...

This is almost an exact copy of code found in these discussions for
getting access to query parameters.  I do not recall if the sample
code used typeArgs but this worked as-is in 1.4.

I am now trying to move this to 1.5 and am told be Eclipse that
"HashMap is a raw type. References to generic type HashMap<K,V> should
be parameterized".  Same thing for "Map".

I have seen one or two similar threads here but the magic seems to be
happening off-screen.  It seems to me that the examples in the other
threds are still using typeArgs.  I'm not seeing the difference.

Do you have pointers to simple explanations of what I should be doing
with parameterized types?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to