This patch adds generic type information to the
openmbean package.

Changelog:

2007-03-05  Andrew John Hughes  <[EMAIL PROTECTED]>

        * gnu/javax/management/Translator.java:
        (translate(String)): Use a Boolean array to
        comply with the new typing.
        * javax/management/openmbean/ArrayType.java:
        Added generic types and updated copyright headers.
        * javax/management/openmbean/CompositeData.java:
        Likewise.
        * javax/management/openmbean/CompositeDataSupport.java:
        Likewise.       
        * javax/management/openmbean/CompositeType.java:
        Likewise.       
        * javax/management/openmbean/OpenMBeanAttributeInfoSupport.java:
        Likewise.       
        * javax/management/openmbean/OpenMBeanOperationInfoSupport.java:
        Likewise.       
        * javax/management/openmbean/OpenMBeanParameterInfoSupport.java:
        Likewise.       
        * javax/management/openmbean/OpenType.java:
        Updated copyright header.       
        * javax/management/openmbean/SimpleType.java:
        Added generic types and updated copyright headers.
        * javax/management/openmbean/TabularData.java:
        Likewise.
        * javax/management/openmbean/TabularDataSupport.java:
        Likewise.
        * javax/management/openmbean/TabularType.java:
        Likewise.

-- 
Andrew :-)

Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html
public class gcj extends Freedom implements Java { ... }
Index: gnu/javax/management/Translator.java
===================================================================
RCS file: /cvsroot/classpath/classpath/gnu/javax/management/Translator.java,v
retrieving revision 1.1
diff -u -3 -p -u -r1.1 Translator.java
--- gnu/javax/management/Translator.java	5 Mar 2007 00:22:41 -0000	1.1
+++ gnu/javax/management/Translator.java	5 Mar 2007 23:11:27 -0000
@@ -308,7 +308,7 @@ public final class Translator
 					       "Translated parameter",
 					       SimpleType.BOOLEAN,
 					       null,
-					       new Object[] {
+					       new Boolean[] {
 						 Boolean.TRUE,
 						 Boolean.FALSE
 					       });
@@ -417,8 +417,7 @@ public final class Translator
 	return new OpenMBeanParameterInfoSupport("TransParam",
 						 "Translated parameter",
 						 SimpleType.STRING,
-						 null,
-						 (Object[]) names);
+						 null, names);
       }
     try
       {
Index: javax/management/openmbean/ArrayType.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/management/openmbean/ArrayType.java,v
retrieving revision 1.1
diff -u -3 -p -u -r1.1 ArrayType.java
--- javax/management/openmbean/ArrayType.java	9 Jul 2006 20:02:03 -0000	1.1
+++ javax/management/openmbean/ArrayType.java	5 Mar 2007 23:11:28 -0000
@@ -1,5 +1,5 @@
 /* ArrayType.java -- Open type descriptor for an array.
-   Copyright (C) 2006 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2007 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -47,8 +47,8 @@ import java.util.Arrays;
  * @author Andrew John Hughes ([EMAIL PROTECTED])
  * @since 1.5
  */
-public class ArrayType
-  extends OpenType
+public class ArrayType<T>
+  extends OpenType<T>
 {
   
   /**
@@ -64,7 +64,7 @@ public class ArrayType
   /**
    * The element type of arrays of this type.
    */
-  private OpenType elementType;
+  private OpenType<?> elementType;
 
   /**
    * The hash code of this instance.
@@ -136,7 +136,7 @@ public class ArrayType
    *                           [EMAIL PROTECTED] SimpleType}, [EMAIL PROTECTED] CompositeType}
    *                           or [EMAIL PROTECTED] TabularType}.
    */
-  public ArrayType(int dim, OpenType elementType)
+  public ArrayType(int dim, OpenType<?> elementType)
     throws OpenDataException
   {
     super(getArrayClassName(elementType.getClassName(), dim),
@@ -197,7 +197,7 @@ public class ArrayType
    *
    * @return the type of the elements.
    */
-  public OpenType getElementOpenType()
+  public OpenType<?> getElementOpenType()
   {
     return elementType;
   }
Index: javax/management/openmbean/CompositeData.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/management/openmbean/CompositeData.java,v
retrieving revision 1.2
diff -u -3 -p -u -r1.2 CompositeData.java
--- javax/management/openmbean/CompositeData.java	22 Jul 2006 11:11:36 -0000	1.2
+++ javax/management/openmbean/CompositeData.java	5 Mar 2007 23:11:28 -0000
@@ -1,5 +1,5 @@
 /* CompositeData.java -- A composite data structure.
-   Copyright (C) 2006 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2007 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -148,7 +148,7 @@ public interface CompositeData
    *
    * @return the values of this instance.
    */
-  Collection values();
+  Collection<?> values();
 
 }
 
Index: javax/management/openmbean/CompositeDataSupport.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/management/openmbean/CompositeDataSupport.java,v
retrieving revision 1.1
diff -u -3 -p -u -r1.1 CompositeDataSupport.java
--- javax/management/openmbean/CompositeDataSupport.java	22 Jul 2006 11:11:36 -0000	1.1
+++ javax/management/openmbean/CompositeDataSupport.java	5 Mar 2007 23:11:28 -0000
@@ -1,5 +1,5 @@
 /* CompositeData.java -- A composite data structure implementation.
-   Copyright (C) 2006 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2007 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -68,7 +68,7 @@ public class CompositeDataSupport
    *
    * @serial the map of field names to values.
    */
-  private SortedMap contents;
+  private SortedMap<String, Object> contents;
 
   /**
    * The composite type which represents this composite data instance.
@@ -106,11 +106,11 @@ public class CompositeDataSupport
    *                             [EMAIL PROTECTED] java.lang.String} (thus calling a failure
    *                             in converting the keys to an array of strings).
    */
-  public CompositeDataSupport(CompositeType type, Map items)
+  public CompositeDataSupport(CompositeType type, Map<String, ?> items)
     throws OpenDataException
   {
     this(type, 
-	 (String[]) items.keySet().toArray(new String[items.size()]),
+	 items.keySet().toArray(new String[items.size()]),
 	 items.values().toArray());
   }
 
@@ -158,7 +158,7 @@ public class CompositeDataSupport
     if (typeKeys.size() != names.length)
       throw new OpenDataException("The number of field names does not match " +
 				  "the type description.");
-    contents = new TreeMap();
+    contents = new TreeMap<String, Object>();
     for (int a = 0; a < names.length; ++a)
       {
 	if (names[a] == null)
Index: javax/management/openmbean/CompositeType.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/management/openmbean/CompositeType.java,v
retrieving revision 1.2
diff -u -3 -p -u -r1.2 CompositeType.java
--- javax/management/openmbean/CompositeType.java	9 Jul 2006 20:02:03 -0000	1.2
+++ javax/management/openmbean/CompositeType.java	5 Mar 2007 23:11:28 -0000
@@ -1,5 +1,5 @@
 /* CompositeType.java -- Type descriptor for CompositeData instances.
-   Copyright (C) 2006 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2007 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -51,7 +51,7 @@ import java.util.TreeMap;
  * @since 1.5
  */
 public class CompositeType
-  extends OpenType
+  extends OpenType<CompositeData>
 {
 
   /**
@@ -62,12 +62,12 @@ public class CompositeType
   /**
    * A map of item names to their descriptions.
    */
-  private TreeMap nameToDescription;
+  private TreeMap<String,String> nameToDescription;
 
   /**
    * A map of item names to their types.
    */
-  private TreeMap nameToType;
+  private TreeMap<String,OpenType<?>> nameToType;
 
   /**
    * The hash code of this instance.
@@ -109,7 +109,7 @@ public class CompositeType
    *                           before comparison.
    */
   public CompositeType(String name, String desc, String[] names,
-		       String[] descs, OpenType[] types)
+		       String[] descs, OpenType<?>[] types)
     throws OpenDataException
   {
     super(CompositeData.class.getName(), name, desc);
@@ -138,7 +138,7 @@ public class CompositeType
 				      "than once.");
 	nameToDescription.put(fieldName, descs[a]);
       }
-    nameToType = new TreeMap();
+    nameToType = new TreeMap<String,OpenType<?>>();
     for (int a = 0; a < names.length; ++a)
       nameToType.put(names[a].trim(), types[a]);
   }
@@ -178,16 +178,14 @@ public class CompositeType
     CompositeType ctype = (CompositeType) obj;
     if (!(ctype.getTypeName().equals(getTypeName())))
       return false;
-    Set keys = keySet();
+    Set<String> keys = keySet();
     if (!(ctype.keySet().equals(keys)))
       return false;
-    Iterator it = keys.iterator();
-    while (it.hasNext())
-      {
-	String key = (String) it.next();
-	if (!(ctype.getType(key).equals(getType(key))))
-	  return false;
-      }
+    for (String key : keys)
+    {
+      if (!(ctype.getType(key).equals(getType(key))))
+	return false;
+    }
     return true;
   }
 
@@ -203,7 +201,7 @@ public class CompositeType
    */
   public String getDescription(String name)
   {
-    return (String) nameToDescription.get(name);
+    return nameToDescription.get(name);
   }
 
   /**
@@ -216,9 +214,9 @@ public class CompositeType
    * @return the type, or <code>null</code> if the
    *         field doesn't exist.
    */
-  public OpenType getType(String name)
+  public OpenType<?> getType(String name)
   {
-    return (OpenType) nameToType.get(name);
+    return nameToType.get(name);
   }
 
   /**
@@ -287,7 +285,7 @@ public class CompositeType
    * @return a unmodifiable set containing the field
    *         name [EMAIL PROTECTED] java.lang.String}s.
    */
-  public Set keySet()
+  public Set<String> keySet()
   {
     return Collections.unmodifiableSet(nameToDescription.keySet());
   }
Index: javax/management/openmbean/OpenMBeanAttributeInfoSupport.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/management/openmbean/OpenMBeanAttributeInfoSupport.java,v
retrieving revision 1.1
diff -u -3 -p -u -r1.1 OpenMBeanAttributeInfoSupport.java
--- javax/management/openmbean/OpenMBeanAttributeInfoSupport.java	2 Aug 2006 21:38:08 -0000	1.1
+++ javax/management/openmbean/OpenMBeanAttributeInfoSupport.java	5 Mar 2007 23:11:28 -0000
@@ -1,5 +1,5 @@
 /* OpenMBeanAttributeInfoSupport.java -- Open typed info about an attribute.
-   Copyright (C) 2006 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2007 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -62,7 +62,7 @@ public class OpenMBeanAttributeInfoSuppo
   /**
    * The open type of the attribute.
    */
-  private OpenType openType;
+  private OpenType<?> openType;
 
   /**
    * The default value of the attribute (may be <code>null</code>).
@@ -72,17 +72,17 @@ public class OpenMBeanAttributeInfoSuppo
   /**
    * The possible legal values of the attribute (may be <code>null</code>).
    */
-  private Set legalValues;
+  private Set<?> legalValues;
 
   /**
    * The minimum value of the attribute (may be <code>null</code>).
    */
-  private Comparable minValue;
+  private Comparable<Object> minValue;
 
   /**
    * The maximum value of the attribute (may be <code>null</code>).
    */
-  private Comparable maxValue;
+  private Comparable<Object> maxValue;
 
   /**
    * The hash code of this instance.
@@ -112,7 +112,7 @@ public class OpenMBeanAttributeInfoSuppo
    *                                  or the name or description are
    *                                  the empty string.
    */
-  public OpenMBeanAttributeInfoSupport(String name, String desc, OpenType type,
+  public OpenMBeanAttributeInfoSupport(String name, String desc, OpenType<?> type,
 				       boolean isReadable, boolean isWritable,
 				       boolean isIs)
   {
@@ -157,9 +157,9 @@ public class OpenMBeanAttributeInfoSuppo
    *                           open type or the open type is an instance
    *                           of [EMAIL PROTECTED] ArrayType} or [EMAIL PROTECTED] TabularType}.
    */
-  public OpenMBeanAttributeInfoSupport(String name, String desc, OpenType type,
-				       boolean isReadable, boolean isWritable,
-				       boolean isIs, Object defaultValue)
+  public <T> OpenMBeanAttributeInfoSupport(String name, String desc, OpenType<T> type,
+					   boolean isReadable, boolean isWritable,
+					   boolean isIs, T defaultValue)
     throws OpenDataException
   {
     this(name, desc, type, isReadable, isWritable, isIs, defaultValue, null);
@@ -203,11 +203,11 @@ public class OpenMBeanAttributeInfoSuppo
    *                                  the empty string.
    * @throws OpenDataException if any condition in the list above is broken.
    */
-  public OpenMBeanAttributeInfoSupport(String name, String desc, OpenType type,
-				       boolean isReadable, boolean isWritable,
-				       boolean isIs, Object defaultValue,
-				       Comparable minimumValue,
-				       Comparable maximumValue)
+  public <T> OpenMBeanAttributeInfoSupport(String name, String desc, OpenType<T> type,
+					   boolean isReadable, boolean isWritable,
+					   boolean isIs, T defaultValue,
+					   Comparable<T> minimumValue,
+					   Comparable<T> maximumValue)
     throws OpenDataException
   {
     this(name, desc, type, isReadable, isWritable, isIs);
@@ -239,8 +239,8 @@ public class OpenMBeanAttributeInfoSuppo
     
     openType = type;
     this.defaultValue = defaultValue;
-    minValue = minimumValue;
-    maxValue = maximumValue;
+    minValue = (Comparable<Object>) minimumValue;
+    maxValue = (Comparable<Object>) maximumValue;
   }
 
   /**
@@ -280,10 +280,10 @@ public class OpenMBeanAttributeInfoSuppo
    *                                  the empty string.
    * @throws OpenDataException if any condition in the list above is broken.
    */
-  public OpenMBeanAttributeInfoSupport(String name, String desc, OpenType type,
-				       boolean isReadable, boolean isWritable,
-				       boolean isIs, Object defaultValue,
-				       Object[] legalValues)
+  public <T> OpenMBeanAttributeInfoSupport(String name, String desc, OpenType<T> type,
+					   boolean isReadable, boolean isWritable,
+					   boolean isIs, T defaultValue,
+					   T[] legalValues)
     throws OpenDataException
   {
     this(name, desc, type, isReadable, isWritable, isIs);
@@ -379,7 +379,7 @@ public class OpenMBeanAttributeInfoSuppo
    * @return a set of legal values, or <code>null</code> if no such
    *         set exists.
    */
-  public Set getLegalValues()
+  public Set<?> getLegalValues()
   {
     return legalValues;
   }
@@ -390,7 +390,7 @@ public class OpenMBeanAttributeInfoSuppo
    *
    * @return the maximum value, or <code>null</code> if none exists.
    */
-  public Comparable getMaxValue()
+  public Comparable<?> getMaxValue()
   {
     return maxValue;
   }
@@ -401,7 +401,7 @@ public class OpenMBeanAttributeInfoSuppo
    *
    * @return the minimum value, or <code>null</code> if none exists.
    */
-  public Comparable getMinValue()
+  public Comparable<?> getMinValue()
   {
     return minValue;
   }
@@ -412,7 +412,7 @@ public class OpenMBeanAttributeInfoSuppo
    *
    * @return the open type of this attribute.
    */
-  public OpenType getOpenType()
+  public OpenType<?> getOpenType()
   {
     return openType;
   }
Index: javax/management/openmbean/OpenMBeanOperationInfoSupport.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/management/openmbean/OpenMBeanOperationInfoSupport.java,v
retrieving revision 1.2
diff -u -3 -p -u -r1.2 OpenMBeanOperationInfoSupport.java
--- javax/management/openmbean/OpenMBeanOperationInfoSupport.java	5 Aug 2006 18:08:28 -0000	1.2
+++ javax/management/openmbean/OpenMBeanOperationInfoSupport.java	5 Mar 2007 23:11:28 -0000
@@ -1,5 +1,5 @@
 /* OpenMBeanOperationInfoSupport.java -- Open typed info about an operation.
-   Copyright (C) 2006 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2007 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -61,7 +61,7 @@ public class OpenMBeanOperationInfoSuppo
   /**
    * The open type representing the return value.
    */
-  private OpenType returnOpenType;
+  private OpenType<?> returnOpenType;
 
   /**
    * The hash code of this instance.
@@ -108,7 +108,7 @@ public class OpenMBeanOperationInfoSuppo
    */
   public OpenMBeanOperationInfoSupport(String name, String desc,
 				       OpenMBeanParameterInfo[] sig,
-				       OpenType type, int impact)
+				       OpenType<?> type, int impact)
   {
     super(name, desc, (MBeanParameterInfo[]) sig,
 	  type == null ? null : type.getClassName(), impact);
@@ -159,7 +159,7 @@ public class OpenMBeanOperationInfoSuppo
    *
    * @return the open type of the return value.
    */
-  public OpenType getReturnOpenType()
+  public OpenType<?> getReturnOpenType()
   {
     return returnOpenType;
   }
Index: javax/management/openmbean/OpenMBeanParameterInfoSupport.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/management/openmbean/OpenMBeanParameterInfoSupport.java,v
retrieving revision 1.4
diff -u -3 -p -u -r1.4 OpenMBeanParameterInfoSupport.java
--- javax/management/openmbean/OpenMBeanParameterInfoSupport.java	5 Aug 2006 18:08:28 -0000	1.4
+++ javax/management/openmbean/OpenMBeanParameterInfoSupport.java	5 Mar 2007 23:11:28 -0000
@@ -1,5 +1,5 @@
 /* OpenMBeanParameterInfoSupport.java -- Open typed info about a parameter.
-   Copyright (C) 2006 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2007 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -63,7 +63,7 @@ public class OpenMBeanParameterInfoSuppo
   /**
    * The open type of the parameter.
    */
-  private OpenType openType;
+  private OpenType<?> openType;
 
   /**
    * The default value of the parameter (may be <code>null</code>).
@@ -73,17 +73,17 @@ public class OpenMBeanParameterInfoSuppo
   /**
    * The possible legal values of the parameter (may be <code>null</code>).
    */
-  private Set legalValues;
+  private Set<?> legalValues;
 
   /**
    * The minimum value of the parameter (may be <code>null</code>).
    */
-  private Comparable minValue;
+  private Comparable<Object> minValue;
 
   /**
    * The maximum value of the parameter (may be <code>null</code>).
    */
-  private Comparable maxValue;
+  private Comparable<Object> maxValue;
 
   /**
    * The hash code of this instance.
@@ -109,7 +109,7 @@ public class OpenMBeanParameterInfoSuppo
    *                                  or the name or description are
    *                                  the empty string.
    */
-  public OpenMBeanParameterInfoSupport(String name, String desc, OpenType type)
+  public OpenMBeanParameterInfoSupport(String name, String desc, OpenType<?> type)
   {
     super(name, type == null ? null : type.getClassName(), desc);
     if (name == null)
@@ -149,8 +149,8 @@ public class OpenMBeanParameterInfoSuppo
    *                           open type or the open type is an instance
    *                           of [EMAIL PROTECTED] ArrayType} or [EMAIL PROTECTED] TabularType}.
    */
-  public OpenMBeanParameterInfoSupport(String name, String desc, OpenType type,
-				       Object defaultValue)
+  public <T> OpenMBeanParameterInfoSupport(String name, String desc, OpenType<T> type,
+					   T defaultValue)
     throws OpenDataException
   {
     this(name, desc, type, defaultValue, null);
@@ -190,9 +190,9 @@ public class OpenMBeanParameterInfoSuppo
    *                                  the empty string.
    * @throws OpenDataException if any condition in the list above is broken.
    */
-  public OpenMBeanParameterInfoSupport(String name, String desc, OpenType type,
-				       Object defaultValue, Comparable minimumValue,
-				       Comparable maximumValue)
+  public <T> OpenMBeanParameterInfoSupport(String name, String desc, OpenType<T> type,
+					   T defaultValue, Comparable<T> minimumValue,
+					   Comparable<T> maximumValue)
     throws OpenDataException
   {
     this(name, desc, type);
@@ -223,8 +223,8 @@ public class OpenMBeanParameterInfoSuppo
 				  "maximum.");
     
     this.defaultValue = defaultValue;
-    minValue = minimumValue;
-    maxValue = maximumValue;
+    minValue = (Comparable<Object>) minimumValue;
+    maxValue = (Comparable<Object>) maximumValue;
   }
 
   /**
@@ -261,8 +261,8 @@ public class OpenMBeanParameterInfoSuppo
    *                                  the empty string.
    * @throws OpenDataException if any condition in the list above is broken.
    */
-  public OpenMBeanParameterInfoSupport(String name, String desc, OpenType type,
-				       Object defaultValue, Object[] legalValues)
+  public <T> OpenMBeanParameterInfoSupport(String name, String desc, OpenType<T> type,
+					   T defaultValue, T[] legalValues)
     throws OpenDataException
   {
     this(name, desc, type);
@@ -351,7 +351,7 @@ public class OpenMBeanParameterInfoSuppo
    * @return a set of legal values, or <code>null</code> if no such
    *         set exists.
    */
-  public Set getLegalValues()
+  public Set<?> getLegalValues()
   {
     return legalValues;
   }
@@ -362,7 +362,7 @@ public class OpenMBeanParameterInfoSuppo
    *
    * @return the maximum value, or <code>null</code> if none exists.
    */
-  public Comparable getMaxValue()
+  public Comparable<?> getMaxValue()
   {
     return maxValue;
   }
@@ -373,7 +373,7 @@ public class OpenMBeanParameterInfoSuppo
    *
    * @return the minimum value, or <code>null</code> if none exists.
    */
-  public Comparable getMinValue()
+  public Comparable<?> getMinValue()
   {
     return minValue;
   }
@@ -384,7 +384,7 @@ public class OpenMBeanParameterInfoSuppo
    *
    * @return the open type of this parameter.
    */
-  public OpenType getOpenType()
+  public OpenType<?> getOpenType()
   {
     return openType;
   }
Index: javax/management/openmbean/OpenType.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/management/openmbean/OpenType.java,v
retrieving revision 1.3
diff -u -3 -p -u -r1.3 OpenType.java
--- javax/management/openmbean/OpenType.java	5 Mar 2007 00:22:41 -0000	1.3
+++ javax/management/openmbean/OpenType.java	5 Mar 2007 23:11:28 -0000
@@ -1,5 +1,5 @@
 /* OpenType.java -- Superclass of all open types.
-   Copyright (C) 2006 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2007 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
Index: javax/management/openmbean/SimpleType.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/management/openmbean/SimpleType.java,v
retrieving revision 1.2
diff -u -3 -p -u -r1.2 SimpleType.java
--- javax/management/openmbean/SimpleType.java	5 Aug 2006 12:25:51 -0000	1.2
+++ javax/management/openmbean/SimpleType.java	5 Mar 2007 23:11:28 -0000
@@ -1,5 +1,5 @@
 /* SimpleType.java -- Open type descriptor for the base types.
-   Copyright (C) 2006 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2007 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -40,6 +40,13 @@ package javax.management.openmbean;
 import java.io.InvalidObjectException;
 import java.io.ObjectStreamException;
 
+import java.math.BigDecimal;
+import java.math.BigInteger;
+
+import java.util.Date;
+
+import javax.management.ObjectName;
+
 /**
  * The open type descriptor for data values that are members
  * of one of the simple types (such as an integer or a string).
@@ -53,94 +60,94 @@ import java.io.ObjectStreamException;
  * @author Andrew John Hughes ([EMAIL PROTECTED])
  * @since 1.5
  */
-public final class SimpleType
-  extends OpenType
+public final class SimpleType<T>
+  extends OpenType<T>
 {
 
   /**
    * The [EMAIL PROTECTED] SimpleType} representation of
    * <code>java.math.BigDecimal</code>.
    */
-  public static final SimpleType BIGDECIMAL;
+  public static final SimpleType<BigDecimal> BIGDECIMAL;
 
   /**
    * The [EMAIL PROTECTED] SimpleType} representation of
    * <code>java.math.BigInteger</code>.
    */
-  public static final SimpleType BIGINTEGER;
+  public static final SimpleType<BigInteger> BIGINTEGER;
 
   /**
    * The [EMAIL PROTECTED] SimpleType} representation of
    * <code>java.lang.Boolean</code>.
    */
-  public static final SimpleType BOOLEAN; 
+  public static final SimpleType<Boolean> BOOLEAN; 
 
   /**
    * The [EMAIL PROTECTED] SimpleType} representation of
    * <code>java.lang.Byte</code>.
    */
-  public static final SimpleType BYTE;
+  public static final SimpleType<Byte> BYTE;
 
   /**
    * The [EMAIL PROTECTED] SimpleType} representation of
    * <code>java.lang.Character</code>.
    */
-  public static final SimpleType CHARACTER;
+  public static final SimpleType<Character> CHARACTER;
 
   /**
    * The [EMAIL PROTECTED] SimpleType} representation of
    * <code>java.util.Date</code>.
    */
-  public static final SimpleType DATE; 
+  public static final SimpleType<Date> DATE; 
 
   /**
    * The [EMAIL PROTECTED] SimpleType} representation of
    * <code>java.lang.Double</code>.
    */
-  public static final SimpleType DOUBLE;
+  public static final SimpleType<Double> DOUBLE;
 
   /**
    * The [EMAIL PROTECTED] SimpleType} representation of
    * <code>java.lang.Float</code>.
    */
-  public static final SimpleType FLOAT;
+  public static final SimpleType<Float> FLOAT;
 
   /**
    * The [EMAIL PROTECTED] SimpleType} representation of
    * <code>java.lang.Integer</code>.
    */
-  public static final SimpleType INTEGER;
+  public static final SimpleType<Integer> INTEGER;
 
   /**
    * The [EMAIL PROTECTED] SimpleType} representation of
    * <code>java.lang.Long</code>.
    */
-  public static final SimpleType LONG;
+  public static final SimpleType<Long> LONG;
 
   /**
    * The [EMAIL PROTECTED] SimpleType} representation of
    * <code>javax.management.ObjectName</code>.
    */
-  public static final SimpleType OBJECTNAME;
+  public static final SimpleType<ObjectName> OBJECTNAME;
 
 
   /**
    * The [EMAIL PROTECTED] SimpleType} representation of
    * <code>java.lang.Short</code>.
    */
-  public static final SimpleType SHORT;
+  public static final SimpleType<Short> SHORT;
 
   /**
    * The [EMAIL PROTECTED] SimpleType} representation of
    * <code>java.lang.String</code>.
    */
-  public static final SimpleType STRING;
+  public static final SimpleType<String> STRING;
 
   /**
    * The [EMAIL PROTECTED] SimpleType} representation of
    * <code>java.lang.Void</code>.
    */
-  public static final SimpleType VOID;
+  public static final SimpleType<Void> VOID;
 
   /**
    * Compatible with JDK 1.5
@@ -164,20 +171,21 @@ public final class SimpleType
   {
     try
       {
-	BIGDECIMAL = new SimpleType("java.math.BigDecimal");
-	BIGINTEGER = new SimpleType("java.math.BigInteger");
-	BOOLEAN = new SimpleType("java.lang.Boolean");
-	BYTE = new SimpleType("java.lang.Byte");
-	CHARACTER = new SimpleType("java.lang.Character");
-	DATE = new SimpleType("java.util.Date");
-	DOUBLE = new SimpleType("java.lang.Double");
-	FLOAT = new SimpleType("java.lang.Float");
-	INTEGER = new SimpleType("java.lang.Integer");
-	LONG = new SimpleType("java.lang.Long");
-	OBJECTNAME = new SimpleType("javax.management.ObjectName");
-	SHORT = new SimpleType("java.lang.Short");
-	STRING = new SimpleType("java.lang.String");
-	VOID = new SimpleType("java.lang.Void");
+	BIGDECIMAL = new SimpleType<BigDecimal>("java.math.BigDecimal");
+	BIGINTEGER = new SimpleType<BigInteger>("java.math.BigInteger");
+	BOOLEAN = new SimpleType<Boolean>("java.lang.Boolean");
+	BYTE = new SimpleType<Byte>("java.lang.Byte");
+	CHARACTER = new SimpleType<Character>("java.lang.Character");
+	DATE = new SimpleType<Date>("java.util.Date");
+	DOUBLE = new SimpleType<Double>("java.lang.Double");
+	FLOAT = new SimpleType<Float>("java.lang.Float");
+	INTEGER = new SimpleType<Integer>("java.lang.Integer");
+	LONG = new SimpleType<Long>("java.lang.Long");
+	OBJECTNAME = 
+	  new SimpleType<ObjectName>("javax.management.ObjectName");
+	SHORT = new SimpleType<Short>("java.lang.Short");
+	STRING = new SimpleType<String>("java.lang.String");
+	VOID = new SimpleType<Void>("java.lang.Void");
       }
     catch (OpenDataException e)
       {
Index: javax/management/openmbean/TabularData.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/management/openmbean/TabularData.java,v
retrieving revision 1.2
diff -u -3 -p -u -r1.2 TabularData.java
--- javax/management/openmbean/TabularData.java	4 Aug 2006 21:31:47 -0000	1.2
+++ javax/management/openmbean/TabularData.java	5 Mar 2007 23:11:28 -0000
@@ -1,5 +1,5 @@
 /* TabularData.java -- Tables of composite data structures.
-   Copyright (C) 2006 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2007 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -165,7 +165,7 @@ public interface TabularData
    *
    * @return a set containing the keys of this instance.
    */
-  Set keySet();
+  Set<?> keySet();
 
   /**
    * Adds the specified [EMAIL PROTECTED] CompositeData} value to the
@@ -253,7 +253,7 @@ public interface TabularData
    *
    * @return the values of this instance.
    */
-  Collection values();
+  Collection<?> values();
 
 }
 
Index: javax/management/openmbean/TabularDataSupport.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/management/openmbean/TabularDataSupport.java,v
retrieving revision 1.1
diff -u -3 -p -u -r1.1 TabularDataSupport.java
--- javax/management/openmbean/TabularDataSupport.java	4 Aug 2006 21:31:47 -0000	1.1
+++ javax/management/openmbean/TabularDataSupport.java	5 Mar 2007 23:11:28 -0000
@@ -1,5 +1,5 @@
 /* TabularDataSupport.java -- Tables of composite data structures.
-   Copyright (C) 2006 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2007 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -55,7 +55,7 @@ import java.util.Set;
  * @since 1.5
  */
 public class TabularDataSupport
-  implements TabularData, Serializable, Cloneable, Map
+  implements TabularData, Serializable, Cloneable, Map<Object,Object>
 {
 
   /**
@@ -68,7 +68,7 @@ public class TabularDataSupport
    *
    * @serial the map of rows to column values.
    */
-  private Map dataMap;
+  private Map<Object,Object> dataMap;
 
   /**
    * The tabular type which represents this tabular data instance.
@@ -113,7 +113,7 @@ public class TabularDataSupport
     if (type == null)
       throw new IllegalArgumentException("The type may not be null.");
     tabularType = type;
-    dataMap = new HashMap(cap, lf);
+    dataMap = new HashMap<Object,Object>(cap, lf);
   }
    
   /**
@@ -279,7 +279,7 @@ public class TabularDataSupport
    * @return the set view of all mapping entries
    * @see java.util.Map.Entry
    */
-  public Set entrySet()
+  public Set<Map.Entry<Object,Object>> entrySet()
   {
     return dataMap.entrySet();
   }
@@ -413,7 +413,7 @@ public class TabularDataSupport
    *
    * @return the set view of all keys
    */
-  public Set keySet()
+  public Set<Object> keySet()
   {
     return dataMap.keySet();
   }
@@ -535,7 +535,7 @@ public class TabularDataSupport
    *                                   of one of the other
    *                                   specified values.
    */
-  public void putAll(Map m)
+  public void putAll(Map<?,?> m)
   {
     if (m == null || m.size() == 0)
       return;
@@ -643,7 +643,7 @@ public class TabularDataSupport
    *
    * @return the collection view of all values
    */
-  public Collection values()
+  public Collection<Object> values()
   {
     return dataMap.values();
   }
Index: javax/management/openmbean/TabularType.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/management/openmbean/TabularType.java,v
retrieving revision 1.2
diff -u -3 -p -u -r1.2 TabularType.java
--- javax/management/openmbean/TabularType.java	9 Jul 2006 20:02:03 -0000	1.2
+++ javax/management/openmbean/TabularType.java	5 Mar 2007 23:11:28 -0000
@@ -1,5 +1,5 @@
 /* TabularType.java -- Type descriptor for TabularData instances.
-   Copyright (C) 2006 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2007 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -50,7 +50,7 @@ import java.util.List;
  * @since 1.5
  */
 public class TabularType
-  extends OpenType
+  extends OpenType<TabularData>
 {
 
   /**
@@ -68,7 +68,7 @@ public class TabularType
    * They are retained in the order given by the user, and is
    * unmodifiable.
    */
-  private List indexNames;
+  private List<String> indexNames;
 
   /**
    * The hash code of this instance.
@@ -167,7 +167,7 @@ public class TabularType
    * @return an unmodifiable list of the index names used by this
    *         tabular data structure.
    */
-  public List getIndexNames()
+  public List<String> getIndexNames()
   {
     return indexNames;
   }

Attachment: signature.asc
Description: Digital signature

Reply via email to