summaryrefslogtreecommitdiff
path: root/javax
diff options
context:
space:
mode:
authorAndrew John Hughes <gnu_andrew@member.fsf.org>2007-03-05 23:19:43 +0000
committerAndrew John Hughes <gnu_andrew@member.fsf.org>2007-03-05 23:19:43 +0000
commit3b6d0c6c0124df49618bf16225ea8f984f831c78 (patch)
tree5b8215bcefd6ce15d678efca96665fab025e8a75 /javax
parent5e7d7af8305ec32c022fd21d117638b3fa569d32 (diff)
downloadclasspath-3b6d0c6c0124df49618bf16225ea8f984f831c78.tar.gz
2007-03-05 Andrew John Hughes <gnu_andrew@member.fsf.org>
* 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.
Diffstat (limited to 'javax')
-rw-r--r--javax/management/openmbean/ArrayType.java12
-rw-r--r--javax/management/openmbean/CompositeData.java4
-rw-r--r--javax/management/openmbean/CompositeDataSupport.java10
-rw-r--r--javax/management/openmbean/CompositeType.java34
-rw-r--r--javax/management/openmbean/OpenMBeanAttributeInfoSupport.java48
-rw-r--r--javax/management/openmbean/OpenMBeanOperationInfoSupport.java8
-rw-r--r--javax/management/openmbean/OpenMBeanParameterInfoSupport.java38
-rw-r--r--javax/management/openmbean/OpenType.java2
-rw-r--r--javax/management/openmbean/SimpleType.java70
-rw-r--r--javax/management/openmbean/TabularData.java6
-rw-r--r--javax/management/openmbean/TabularDataSupport.java16
-rw-r--r--javax/management/openmbean/TabularType.java8
12 files changed, 131 insertions, 125 deletions
diff --git a/javax/management/openmbean/ArrayType.java b/javax/management/openmbean/ArrayType.java
index d2fc398d6..5b9d31416 100644
--- a/javax/management/openmbean/ArrayType.java
+++ b/javax/management/openmbean/ArrayType.java
@@ -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 (gnu_andrew@member.fsf.org)
* @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
* {@link SimpleType}, {@link CompositeType}
* or {@link 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;
}
diff --git a/javax/management/openmbean/CompositeData.java b/javax/management/openmbean/CompositeData.java
index 08f0dc253..3134bc4c4 100644
--- a/javax/management/openmbean/CompositeData.java
+++ b/javax/management/openmbean/CompositeData.java
@@ -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();
}
diff --git a/javax/management/openmbean/CompositeDataSupport.java b/javax/management/openmbean/CompositeDataSupport.java
index 5d5adb727..4675f9229 100644
--- a/javax/management/openmbean/CompositeDataSupport.java
+++ b/javax/management/openmbean/CompositeDataSupport.java
@@ -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
* {@link 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)
diff --git a/javax/management/openmbean/CompositeType.java b/javax/management/openmbean/CompositeType.java
index 0ae5a4e4b..1a213f607 100644
--- a/javax/management/openmbean/CompositeType.java
+++ b/javax/management/openmbean/CompositeType.java
@@ -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 {@link java.lang.String}s.
*/
- public Set keySet()
+ public Set<String> keySet()
{
return Collections.unmodifiableSet(nameToDescription.keySet());
}
diff --git a/javax/management/openmbean/OpenMBeanAttributeInfoSupport.java b/javax/management/openmbean/OpenMBeanAttributeInfoSupport.java
index 83e043640..22667aadf 100644
--- a/javax/management/openmbean/OpenMBeanAttributeInfoSupport.java
+++ b/javax/management/openmbean/OpenMBeanAttributeInfoSupport.java
@@ -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 OpenMBeanAttributeInfoSupport
/**
* 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 OpenMBeanAttributeInfoSupport
/**
* 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 OpenMBeanAttributeInfoSupport
* 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 OpenMBeanAttributeInfoSupport
* open type or the open type is an instance
* of {@link ArrayType} or {@link 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 OpenMBeanAttributeInfoSupport
* 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 OpenMBeanAttributeInfoSupport
openType = type;
this.defaultValue = defaultValue;
- minValue = minimumValue;
- maxValue = maximumValue;
+ minValue = (Comparable<Object>) minimumValue;
+ maxValue = (Comparable<Object>) maximumValue;
}
/**
@@ -280,10 +280,10 @@ public class OpenMBeanAttributeInfoSupport
* 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 OpenMBeanAttributeInfoSupport
* @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 OpenMBeanAttributeInfoSupport
*
* @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 OpenMBeanAttributeInfoSupport
*
* @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 OpenMBeanAttributeInfoSupport
*
* @return the open type of this attribute.
*/
- public OpenType getOpenType()
+ public OpenType<?> getOpenType()
{
return openType;
}
diff --git a/javax/management/openmbean/OpenMBeanOperationInfoSupport.java b/javax/management/openmbean/OpenMBeanOperationInfoSupport.java
index 07564897c..c01433de0 100644
--- a/javax/management/openmbean/OpenMBeanOperationInfoSupport.java
+++ b/javax/management/openmbean/OpenMBeanOperationInfoSupport.java
@@ -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 OpenMBeanOperationInfoSupport
/**
* 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 OpenMBeanOperationInfoSupport
*/
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 OpenMBeanOperationInfoSupport
*
* @return the open type of the return value.
*/
- public OpenType getReturnOpenType()
+ public OpenType<?> getReturnOpenType()
{
return returnOpenType;
}
diff --git a/javax/management/openmbean/OpenMBeanParameterInfoSupport.java b/javax/management/openmbean/OpenMBeanParameterInfoSupport.java
index af3bda6c7..7fad2a131 100644
--- a/javax/management/openmbean/OpenMBeanParameterInfoSupport.java
+++ b/javax/management/openmbean/OpenMBeanParameterInfoSupport.java
@@ -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 OpenMBeanParameterInfoSupport
/**
* 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 OpenMBeanParameterInfoSupport
/**
* 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 OpenMBeanParameterInfoSupport
* 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 OpenMBeanParameterInfoSupport
* open type or the open type is an instance
* of {@link ArrayType} or {@link 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 OpenMBeanParameterInfoSupport
* 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 OpenMBeanParameterInfoSupport
"maximum.");
this.defaultValue = defaultValue;
- minValue = minimumValue;
- maxValue = maximumValue;
+ minValue = (Comparable<Object>) minimumValue;
+ maxValue = (Comparable<Object>) maximumValue;
}
/**
@@ -261,8 +261,8 @@ public class OpenMBeanParameterInfoSupport
* 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 OpenMBeanParameterInfoSupport
* @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 OpenMBeanParameterInfoSupport
*
* @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 OpenMBeanParameterInfoSupport
*
* @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 OpenMBeanParameterInfoSupport
*
* @return the open type of this parameter.
*/
- public OpenType getOpenType()
+ public OpenType<?> getOpenType()
{
return openType;
}
diff --git a/javax/management/openmbean/OpenType.java b/javax/management/openmbean/OpenType.java
index 2f827b59f..62e05b617 100644
--- a/javax/management/openmbean/OpenType.java
+++ b/javax/management/openmbean/OpenType.java
@@ -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.
diff --git a/javax/management/openmbean/SimpleType.java b/javax/management/openmbean/SimpleType.java
index 39753f1c6..faffd3a45 100644
--- a/javax/management/openmbean/SimpleType.java
+++ b/javax/management/openmbean/SimpleType.java
@@ -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 (gnu_andrew@member.fsf.org)
* @since 1.5
*/
-public final class SimpleType
- extends OpenType
+public final class SimpleType<T>
+ extends OpenType<T>
{
/**
* The {@link SimpleType} representation of
* <code>java.math.BigDecimal</code>.
*/
- public static final SimpleType BIGDECIMAL;
+ public static final SimpleType<BigDecimal> BIGDECIMAL;
/**
* The {@link SimpleType} representation of
* <code>java.math.BigInteger</code>.
*/
- public static final SimpleType BIGINTEGER;
+ public static final SimpleType<BigInteger> BIGINTEGER;
/**
* The {@link SimpleType} representation of
* <code>java.lang.Boolean</code>.
*/
- public static final SimpleType BOOLEAN;
+ public static final SimpleType<Boolean> BOOLEAN;
/**
* The {@link SimpleType} representation of
* <code>java.lang.Byte</code>.
*/
- public static final SimpleType BYTE;
+ public static final SimpleType<Byte> BYTE;
/**
* The {@link SimpleType} representation of
* <code>java.lang.Character</code>.
*/
- public static final SimpleType CHARACTER;
+ public static final SimpleType<Character> CHARACTER;
/**
* The {@link SimpleType} representation of
* <code>java.util.Date</code>.
*/
- public static final SimpleType DATE;
+ public static final SimpleType<Date> DATE;
/**
* The {@link SimpleType} representation of
* <code>java.lang.Double</code>.
*/
- public static final SimpleType DOUBLE;
+ public static final SimpleType<Double> DOUBLE;
/**
* The {@link SimpleType} representation of
* <code>java.lang.Float</code>.
*/
- public static final SimpleType FLOAT;
+ public static final SimpleType<Float> FLOAT;
/**
* The {@link SimpleType} representation of
* <code>java.lang.Integer</code>.
*/
- public static final SimpleType INTEGER;
+ public static final SimpleType<Integer> INTEGER;
/**
* The {@link SimpleType} representation of
* <code>java.lang.Long</code>.
*/
- public static final SimpleType LONG;
+ public static final SimpleType<Long> LONG;
/**
* The {@link SimpleType} representation of
* <code>javax.management.ObjectName</code>.
*/
- public static final SimpleType OBJECTNAME;
+ public static final SimpleType<ObjectName> OBJECTNAME;
/**
* The {@link SimpleType} representation of
* <code>java.lang.Short</code>.
*/
- public static final SimpleType SHORT;
+ public static final SimpleType<Short> SHORT;
/**
* The {@link SimpleType} representation of
* <code>java.lang.String</code>.
*/
- public static final SimpleType STRING;
+ public static final SimpleType<String> STRING;
/**
* The {@link 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)
{
diff --git a/javax/management/openmbean/TabularData.java b/javax/management/openmbean/TabularData.java
index 7e57e0fd8..75ab00b7e 100644
--- a/javax/management/openmbean/TabularData.java
+++ b/javax/management/openmbean/TabularData.java
@@ -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 {@link CompositeData} value to the
@@ -253,7 +253,7 @@ public interface TabularData
*
* @return the values of this instance.
*/
- Collection values();
+ Collection<?> values();
}
diff --git a/javax/management/openmbean/TabularDataSupport.java b/javax/management/openmbean/TabularDataSupport.java
index 9dc8a0e97..1d340e86f 100644
--- a/javax/management/openmbean/TabularDataSupport.java
+++ b/javax/management/openmbean/TabularDataSupport.java
@@ -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();
}
diff --git a/javax/management/openmbean/TabularType.java b/javax/management/openmbean/TabularType.java
index c38f5ea62..9a0881e0f 100644
--- a/javax/management/openmbean/TabularType.java
+++ b/javax/management/openmbean/TabularType.java
@@ -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;
}