|
From: <ls...@us...> - 2007-01-07 08:19:54
|
Revision: 2999
http://jnode.svn.sourceforge.net/jnode/?rev=2999&view=rev
Author: lsantha
Date: 2007-01-07 00:19:52 -0800 (Sun, 07 Jan 2007)
Log Message:
-----------
Classpath patches.
Modified Paths:
--------------
trunk/core/src/classpath/javax/javax/imageio/IIOImage.java
trunk/core/src/classpath/javax/javax/imageio/ImageIO.java
trunk/core/src/classpath/javax/javax/imageio/ImageReader.java
trunk/core/src/classpath/javax/javax/imageio/ImageWriteParam.java
trunk/core/src/classpath/javax/javax/imageio/ImageWriter.java
trunk/core/src/classpath/javax/javax/imageio/metadata/IIOMetadataFormat.java
trunk/core/src/classpath/javax/javax/imageio/metadata/IIOMetadataFormatImpl.java
trunk/core/src/classpath/javax/javax/imageio/spi/IIORegistry.java
trunk/core/src/classpath/javax/javax/imageio/spi/IIOServiceProvider.java
trunk/core/src/classpath/javax/javax/imageio/spi/ImageInputStreamSpi.java
trunk/core/src/classpath/javax/javax/imageio/spi/ImageOutputStreamSpi.java
trunk/core/src/classpath/javax/javax/imageio/spi/RegisterableService.java
trunk/core/src/classpath/javax/javax/imageio/spi/ServiceRegistry.java
trunk/core/src/classpath/javax/javax/imageio/stream/FileCacheImageOutputStream.java
Modified: trunk/core/src/classpath/javax/javax/imageio/IIOImage.java
===================================================================
--- trunk/core/src/classpath/javax/javax/imageio/IIOImage.java 2007-01-07 05:43:57 UTC (rev 2998)
+++ trunk/core/src/classpath/javax/javax/imageio/IIOImage.java 2007-01-07 08:19:52 UTC (rev 2999)
@@ -79,8 +79,7 @@
/**
* A list of BufferedImage thumbnails of this image.
*/
- // for 1.5 these lists are List<? extends BufferedImage>
- protected List thumbnails;
+ protected List<? extends BufferedImage> thumbnails;
/**
* Construct an IIOImage containing raster image data, thumbnails
@@ -92,7 +91,8 @@
*
* @exception IllegalArgumentException if raster is null
*/
- public IIOImage (Raster raster, List thumbnails, IIOMetadata metadata)
+ public IIOImage (Raster raster, List<? extends BufferedImage> thumbnails,
+ IIOMetadata metadata)
{
if (raster == null)
throw new IllegalArgumentException ("raster may not be null");
@@ -112,7 +112,8 @@
*
* @exception IllegalArgumentException if image is null
*/
- public IIOImage (RenderedImage image, List thumbnails, IIOMetadata metadata)
+ public IIOImage (RenderedImage image, List<? extends BufferedImage> thumbnails,
+ IIOMetadata metadata)
{
if (image == null)
throw new IllegalArgumentException ("image may not be null");
@@ -192,7 +193,7 @@
*
* @return a list of thumbnails or null
*/
- public List getThumbnails()
+ public List<? extends BufferedImage> getThumbnails()
{
return thumbnails;
}
@@ -260,7 +261,7 @@
*
* @param thumbnails a new list of thumbnails or null
*/
- public void setThumbnails (List thumbnails)
+ public void setThumbnails (List<? extends BufferedImage> thumbnails)
{
this.thumbnails = thumbnails;
}
Modified: trunk/core/src/classpath/javax/javax/imageio/ImageIO.java
===================================================================
--- trunk/core/src/classpath/javax/javax/imageio/ImageIO.java 2007-01-07 05:43:57 UTC (rev 2998)
+++ trunk/core/src/classpath/javax/javax/imageio/ImageIO.java 2007-01-07 08:19:52 UTC (rev 2999)
@@ -315,27 +315,37 @@
}
}
- private static final class ImageReaderIterator implements Iterator
+ private static final class ImageReaderIterator
+ implements Iterator<ImageReader>
{
- Iterator it;
+ Iterator<ImageReaderSpi> it;
Object readerExtension;
- public ImageReaderIterator(Iterator it, Object readerExtension)
+ public ImageReaderIterator(Iterator<ImageReaderSpi> it,
+ Object readerExtension)
{
this.it = it;
this.readerExtension = readerExtension;
}
+ public ImageReaderIterator(Iterator<ImageReaderSpi> it)
+ {
+ this.it = it;
+ }
+
public boolean hasNext()
{
return it.hasNext();
}
- public Object next()
+ public ImageReader next()
{
try
{
- return ((ImageReaderSpi) it.next()).createReaderInstance(readerExtension);
+ ImageReaderSpi spi = it.next();
+ return (readerExtension == null
+ ? spi.createReaderInstance()
+ : spi.createReaderInstance(readerExtension));
}
catch (IOException e)
{
@@ -349,27 +359,37 @@
}
}
- private static final class ImageWriterIterator implements Iterator
+ private static final class ImageWriterIterator
+ implements Iterator<ImageWriter>
{
- Iterator it;
+ Iterator<ImageWriterSpi> it;
Object writerExtension;
- public ImageWriterIterator(Iterator it, Object writerExtension)
+ public ImageWriterIterator(Iterator<ImageWriterSpi> it,
+ Object writerExtension)
{
this.it = it;
this.writerExtension = writerExtension;
}
+ public ImageWriterIterator(Iterator<ImageWriterSpi> it)
+ {
+ this.it = it;
+ }
+
public boolean hasNext()
{
return it.hasNext();
}
- public Object next()
+ public ImageWriter next()
{
try
{
- return ((ImageWriterSpi) it.next()).createWriterInstance(writerExtension);
+ ImageWriterSpi spi = it.next();
+ return (writerExtension == null
+ ? spi.createWriterInstance()
+ : spi.createWriterInstance(writerExtension));
}
catch (IOException e)
{
@@ -386,13 +406,14 @@
private static File cacheDirectory;
private static boolean useCache = true;
- private static Iterator getReadersByFilter(Class type,
+ private static Iterator<ImageReader> getReadersByFilter(Class<ImageReaderSpi> type,
ServiceRegistry.Filter filter,
Object readerExtension)
{
try
{
- Iterator it = getRegistry().getServiceProviders(type, filter, true);
+ Iterator<ImageReaderSpi> it
+ = getRegistry().getServiceProviders(type, filter, true);
return new ImageReaderIterator(it, readerExtension);
}
catch (IllegalArgumentException e)
@@ -401,13 +422,14 @@
}
}
- private static Iterator getWritersByFilter(Class type,
+ private static Iterator<ImageWriter> getWritersByFilter(Class<ImageWriterSpi> type,
ServiceRegistry.Filter filter,
Object writerExtension)
{
try
{
- Iterator it = getRegistry().getServiceProviders(type, filter, true);
+ Iterator<ImageWriterSpi> it
+ = getRegistry().getServiceProviders(type, filter, true);
return new ImageWriterIterator(it, writerExtension);
}
catch (IllegalArgumentException e)
@@ -436,7 +458,7 @@
*
* @exception IllegalArgumentException if formatName is null
*/
- public static Iterator getImageReadersByFormatName(String formatName)
+ public static Iterator<ImageReader> getImageReadersByFormatName(String formatName)
{
if (formatName == null)
throw new IllegalArgumentException("formatName may not be null");
@@ -457,7 +479,7 @@
*
* @exception IllegalArgumentException if MIMEType is null
*/
- public static Iterator getImageReadersByMIMEType(String MIMEType)
+ public static Iterator<ImageReader> getImageReadersByMIMEType(String MIMEType)
{
if (MIMEType == null)
throw new IllegalArgumentException("MIMEType may not be null");
@@ -477,7 +499,7 @@
*
* @exception IllegalArgumentException if fileSuffix is null
*/
- public static Iterator getImageReadersBySuffix(String fileSuffix)
+ public static Iterator<ImageReader> getImageReadersBySuffix(String fileSuffix)
{
if (fileSuffix == null)
throw new IllegalArgumentException("formatName may not be null");
@@ -497,7 +519,7 @@
*
* @exception IllegalArgumentException if formatName is null
*/
- public static Iterator getImageWritersByFormatName(String formatName)
+ public static Iterator<ImageWriter> getImageWritersByFormatName(String formatName)
{
if (formatName == null)
throw new IllegalArgumentException("formatName may not be null");
@@ -518,7 +540,7 @@
*
* @exception IllegalArgumentException if MIMEType is null
*/
- public static Iterator getImageWritersByMIMEType(String MIMEType)
+ public static Iterator<ImageWriter> getImageWritersByMIMEType(String MIMEType)
{
if (MIMEType == null)
throw new IllegalArgumentException("MIMEType may not be null");
@@ -538,7 +560,7 @@
*
* @exception IllegalArgumentException if fileSuffix is null
*/
- public static Iterator getImageWritersBySuffix(String fileSuffix)
+ public static Iterator<ImageWriter> getImageWritersBySuffix(String fileSuffix)
{
if (fileSuffix == null)
throw new IllegalArgumentException("fileSuffix may not be null");
@@ -1068,8 +1090,7 @@
if (writer == null)
throw new IllegalArgumentException ("null argument");
- ImageWriterSpi spi = (ImageWriterSpi) getRegistry()
- .getServiceProviderByClass(writer.getClass());
+ ImageWriterSpi spi = writer.getOriginatingProvider();
String[] readerSpiNames = spi.getImageReaderSpiNames();
@@ -1098,14 +1119,16 @@
*
* @return an iterator over a collection of image readers
*/
- public static Iterator getImageReaders (Object input)
+ public static Iterator<ImageReader> getImageReaders (Object input)
{
if (input == null)
throw new IllegalArgumentException ("null argument");
- return getRegistry().getServiceProviders (ImageReaderSpi.class,
+ Iterator<ImageReaderSpi> spiIterator
+ = getRegistry().getServiceProviders (ImageReaderSpi.class,
new ReaderObjectFilter(input),
true);
+ return new ImageReaderIterator(spiIterator);
}
/**
@@ -1118,16 +1141,18 @@
*
* @return an iterator over a collection of image writers
*/
- public static Iterator getImageWriters (ImageTypeSpecifier type,
+ public static Iterator<ImageWriter> getImageWriters (ImageTypeSpecifier type,
String formatName)
{
if (type == null || formatName == null)
throw new IllegalArgumentException ("null argument");
- return getRegistry().getServiceProviders (ImageWriterSpi.class,
+ final Iterator<ImageWriterSpi> spiIterator
+ = getRegistry().getServiceProviders (ImageWriterSpi.class,
new WriterObjectFilter(type,
formatName),
true);
+ return new ImageWriterIterator(spiIterator);
}
/**
@@ -1149,8 +1174,7 @@
if (reader == null)
throw new IllegalArgumentException ("null argument");
- ImageReaderSpi spi = (ImageReaderSpi) getRegistry()
- .getServiceProviderByClass(reader.getClass());
+ ImageReaderSpi spi = reader.getOriginatingProvider();
String[] writerSpiNames = spi.getImageWriterSpiNames();
@@ -1184,15 +1208,33 @@
* @exception IllegalArgumentException if either reader or writer is
* null
*/
- public static Iterator getImageTranscoders (ImageReader reader,
+ public static Iterator<ImageTranscoder> getImageTranscoders (ImageReader reader,
ImageWriter writer)
{
if (reader == null || writer == null)
throw new IllegalArgumentException ("null argument");
- return getRegistry().getServiceProviders (ImageTranscoderSpi.class,
+ final Iterator<ImageTranscoderSpi> spiIterator
+ = getRegistry().getServiceProviders (ImageTranscoderSpi.class,
new TranscoderFilter (reader,
writer),
true);
+ return new Iterator<ImageTranscoder>()
+ {
+ public boolean hasNext()
+ {
+ return spiIterator.hasNext();
+ }
+
+ public ImageTranscoder next()
+ {
+ return spiIterator.next().createTranscoderInstance();
+ }
+
+ public void remove()
+ {
+ throw new UnsupportedOperationException();
+ }
+ };
}
}
Modified: trunk/core/src/classpath/javax/javax/imageio/ImageReader.java
===================================================================
--- trunk/core/src/classpath/javax/javax/imageio/ImageReader.java 2007-01-07 05:43:57 UTC (rev 2998)
+++ trunk/core/src/classpath/javax/javax/imageio/ImageReader.java 2007-01-07 08:19:52 UTC (rev 2999)
@@ -116,7 +116,7 @@
* A list of installed progress listeners. Initially null, meaning
* no installed listeners.
*/
- protected List progressListeners = null;
+ protected List<IIOReadProgressListener> progressListeners = null;
/**
* true if this reader should only read data further ahead in the
@@ -129,19 +129,19 @@
* A list of installed update listeners. Initially null, meaning no
* installed listeners.
*/
- protected List updateListeners = null;
+ protected List<IIOReadUpdateListener> updateListeners = null;
/**
* A list of installed warning listeners. Initially null, meaning
* no installed listeners.
*/
- protected List warningListeners = null;
+ protected List<IIOReadWarningListener> warningListeners = null;
/**
* A list of warning locales corresponding with the list of
* installed warning listeners. Initially null, meaning no locales.
*/
- protected List warningLocales = null;
+ protected List<Locale> warningLocales = null;
/**
* Construct an image reader.
@@ -371,7 +371,7 @@
* out-of-bounds
* @exception IOException if a read error occurs
*/
- public abstract Iterator getImageTypes(int imageIndex)
+ public abstract Iterator<ImageTypeSpecifier> getImageTypes(int imageIndex)
throws IOException;
/**
@@ -1594,7 +1594,7 @@
* height is greater than Integer.MAX_VALUE
*/
protected static BufferedImage getDestination (ImageReadParam param,
- Iterator imageTypes,
+ Iterator<ImageTypeSpecifier> imageTypes,
int width,
int height)
throws IIOException
@@ -1694,7 +1694,7 @@
*/
public IIOMetadata getImageMetadata (int imageIndex,
String formatName,
- Set nodeNames)
+ Set<String> nodeNames)
throws IOException
{
if (formatName == null || nodeNames == null)
@@ -1808,7 +1808,7 @@
* @exception IOException if a read error occurs
*/
public IIOMetadata getStreamMetadata (String formatName,
- Set nodeNames)
+ Set<String> nodeNames)
throws IOException
{
if (formatName == null || nodeNames == null)
@@ -1915,7 +1915,7 @@
* destination image regions are empty
* @exception IOException if a read error occurs
*/
- public Iterator readAll (Iterator params)
+ public Iterator<IIOImage> readAll (Iterator<? extends ImageReadParam> params)
throws IOException
{
List l = new ArrayList ();
Modified: trunk/core/src/classpath/javax/javax/imageio/ImageWriteParam.java
===================================================================
--- trunk/core/src/classpath/javax/javax/imageio/ImageWriteParam.java 2007-01-07 05:43:57 UTC (rev 2998)
+++ trunk/core/src/classpath/javax/javax/imageio/ImageWriteParam.java 2007-01-07 08:19:52 UTC (rev 2999)
@@ -278,7 +278,7 @@
public String[] getCompressionQualityDescriptions()
{
checkNotExplicitCompression();
- checkCompressionTypesSet();;
+ checkCompressionTypesSet();
return null;
}
@@ -286,7 +286,7 @@
public float[] getCompressionQualityValues()
{
checkNotExplicitCompression();
- checkCompressionTypesSet();;
+ checkCompressionTypesSet();
return null;
}
Modified: trunk/core/src/classpath/javax/javax/imageio/ImageWriter.java
===================================================================
--- trunk/core/src/classpath/javax/javax/imageio/ImageWriter.java 2007-01-07 05:43:57 UTC (rev 2998)
+++ trunk/core/src/classpath/javax/javax/imageio/ImageWriter.java 2007-01-07 08:19:52 UTC (rev 2999)
@@ -40,6 +40,7 @@
import java.awt.Dimension;
import java.awt.Rectangle;
+import java.awt.image.BufferedImage;
import java.awt.image.Raster;
import java.awt.image.RenderedImage;
import java.io.IOException;
@@ -102,19 +103,19 @@
* A list of installed progress listeners. Initially null, meaning
* no installed listeners.
*/
- protected List progressListeners = null;
+ protected List<IIOWriteProgressListener> progressListeners = null;
/**
* A list of installed warning listeners. Initially null, meaning
* no installed listeners.
*/
- protected List warningListeners = null;
+ protected List<IIOWriteWarningListener> warningListeners = null;
/**
* A list of warning locales corresponding with the list of
* installed warning listeners. Initially null, meaning no locales.
*/
- protected List warningLocales = null;
+ protected List<Locale> warningLocales = null;
/**
* Construct an image writer.
@@ -1076,7 +1077,7 @@
public void prepareInsertEmpty (int imageIndex, ImageTypeSpecifier imageType,
int width, int height,
IIOMetadata imageMetadata,
- List thumbnails,
+ List<? extends BufferedImage> thumbnails,
ImageWriteParam param)
throws IOException
{
@@ -1149,7 +1150,7 @@
ImageTypeSpecifier imageType,
int width, int height,
IIOMetadata imageMetadata,
- List thumbnails,
+ List<? extends BufferedImage> thumbnails,
ImageWriteParam param)
throws IOException
{
Modified: trunk/core/src/classpath/javax/javax/imageio/metadata/IIOMetadataFormat.java
===================================================================
--- trunk/core/src/classpath/javax/javax/imageio/metadata/IIOMetadataFormat.java 2007-01-07 05:43:57 UTC (rev 2998)
+++ trunk/core/src/classpath/javax/javax/imageio/metadata/IIOMetadataFormat.java 2007-01-07 08:19:52 UTC (rev 2999)
@@ -106,15 +106,15 @@
int getObjectArrayMinLength (String elementName);
- Class getObjectClass (String elementName);
+ Class<?> getObjectClass (String elementName);
Object getObjectDefaultValue (String elementName);
Object[] getObjectEnumerations (String elementName);
- Comparable getObjectMaxValue (String elementName);
+ Comparable<?> getObjectMaxValue (String elementName);
- Comparable getObjectMinValue (String elementName);
+ Comparable<?> getObjectMinValue (String elementName);
int getObjectValueType (String elementName);
Modified: trunk/core/src/classpath/javax/javax/imageio/metadata/IIOMetadataFormatImpl.java
===================================================================
--- trunk/core/src/classpath/javax/javax/imageio/metadata/IIOMetadataFormatImpl.java 2007-01-07 05:43:57 UTC (rev 2998)
+++ trunk/core/src/classpath/javax/javax/imageio/metadata/IIOMetadataFormatImpl.java 2007-01-07 08:19:52 UTC (rev 2999)
@@ -462,7 +462,7 @@
int dataType,
boolean required,
String defaultValue,
- List enumeratedValues)
+ List<String> enumeratedValues)
{
IIOMetadataNode node = (IIOMetadataNode) nodes.get (elementName);
node.setAttributeNode (new IIOMetadataNodeAttrEnumerated (node,
@@ -568,8 +568,8 @@
node.setUserObject (null);
}
- protected void addObjectValue (String elementName, Class classType,
- boolean required, Object defaultValue)
+ protected <T> void addObjectValue (String elementName, Class<T> classType,
+ boolean required, T defaultValue)
{
IIOMetadataNode node = (IIOMetadataNode) nodes.get (elementName);
addNodeObject (node, new NodeObject (node,
@@ -578,9 +578,9 @@
defaultValue));
}
- protected void addObjectValue (String elementName, Class classType,
- boolean required, Object defaultValue,
- List enumeratedValues)
+ protected <T> void addObjectValue (String elementName, Class<T> classType,
+ boolean required, T defaultValue,
+ List<? extends T> enumeratedValues)
{
IIOMetadataNode node = (IIOMetadataNode) nodes.get (elementName);
addNodeObject (node, new NodeObjectEnumerated (node,
@@ -590,10 +590,11 @@
enumeratedValues));
}
- protected void addObjectValue (String elementName, Class classType,
- Object defaultValue,
- Comparable minValue,
- Comparable maxValue,
+ protected <T extends Object & Comparable<? super T>>
+ void addObjectValue (String elementName, Class<T> classType,
+ T defaultValue,
+ Comparable<? super T> minValue,
+ Comparable<? super T> maxValue,
boolean minInclusive,
boolean maxInclusive)
{
@@ -607,7 +608,7 @@
maxInclusive));
}
- protected void addObjectValue (String elementName, Class classType,
+ protected void addObjectValue (String elementName, Class<?> classType,
int arrayMinLength, int arrayMaxLength)
{
IIOMetadataNode node = (IIOMetadataNode) nodes.get (elementName);
@@ -836,7 +837,7 @@
return ((Integer) ((NodeObjectArray) getNodeObject (node)).getArrayMinLength ()).intValue();
}
- public Class getObjectClass (String elementName)
+ public Class<?> getObjectClass (String elementName)
{
IIOMetadataNode node = (IIOMetadataNode) nodes.get (elementName);
return getNodeObject (node).getClassType ();
@@ -854,13 +855,13 @@
return ((NodeObjectEnumerated) getNodeObject (node)).getEnumerations ();
}
- public Comparable getObjectMaxValue (String elementName)
+ public Comparable<?> getObjectMaxValue (String elementName)
{
IIOMetadataNode node = (IIOMetadataNode) nodes.get (elementName);
return ((NodeObjectBounded) getNodeObject (node)).getMaxValue ();
}
- public Comparable getObjectMinValue (String elementName)
+ public Comparable<?> getObjectMinValue (String elementName)
{
IIOMetadataNode node = (IIOMetadataNode) nodes.get (elementName);
return ((NodeObjectBounded) getNodeObject (node)).getMinValue ();
Modified: trunk/core/src/classpath/javax/javax/imageio/spi/IIORegistry.java
===================================================================
--- trunk/core/src/classpath/javax/javax/imageio/spi/IIORegistry.java 2007-01-07 05:43:57 UTC (rev 2998)
+++ trunk/core/src/classpath/javax/javax/imageio/spi/IIORegistry.java 2007-01-07 08:19:52 UTC (rev 2999)
@@ -39,13 +39,13 @@
package javax.imageio.spi;
import gnu.classpath.ServiceFactory;
-import gnu.java.awt.ClasspathToolkit;
import java.awt.Toolkit;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
+import gnu.java.awt.ClasspathToolkit;
import gnu.javax.imageio.bmp.BMPImageReaderSpi;
import gnu.javax.imageio.bmp.BMPImageWriterSpi;
import gnu.javax.imageio.gif.GIFImageReaderSpi;
Modified: trunk/core/src/classpath/javax/javax/imageio/spi/IIOServiceProvider.java
===================================================================
--- trunk/core/src/classpath/javax/javax/imageio/spi/IIOServiceProvider.java 2007-01-07 05:43:57 UTC (rev 2998)
+++ trunk/core/src/classpath/javax/javax/imageio/spi/IIOServiceProvider.java 2007-01-07 08:19:52 UTC (rev 2999)
@@ -110,7 +110,7 @@
* @param category the service category for which this provider has
* been registered as an implementor.
*/
- public void onRegistration(ServiceRegistry registry, Class category)
+ public void onRegistration(ServiceRegistry registry, Class<?> category)
{
}
@@ -128,7 +128,7 @@
* @param category the service category for which this provider has
* been registered as an implementor.
*/
- public void onDeregistration(ServiceRegistry registry, Class category)
+ public void onDeregistration(ServiceRegistry registry, Class<?> category)
{
}
Modified: trunk/core/src/classpath/javax/javax/imageio/spi/ImageInputStreamSpi.java
===================================================================
--- trunk/core/src/classpath/javax/javax/imageio/spi/ImageInputStreamSpi.java 2007-01-07 05:43:57 UTC (rev 2998)
+++ trunk/core/src/classpath/javax/javax/imageio/spi/ImageInputStreamSpi.java 2007-01-07 08:19:52 UTC (rev 2999)
@@ -59,7 +59,7 @@
* Indicates which kind of input is processable by the streams
* created by {@link #createInputStreamInstance(Object)}.
*/
- protected Class inputClass;
+ protected Class<?> inputClass;
/**
@@ -80,7 +80,7 @@
* or <code>version</code> is <code>null</code>.
*/
public ImageInputStreamSpi(String vendorName, String version,
- Class inputClass)
+ Class<?> inputClass)
{
super(vendorName, version);
this.inputClass = inputClass;
@@ -91,7 +91,7 @@
* Determines which kind of input is processable by the streams
* created by {@link #createInputStreamInstance(Object)}.
*/
- public Class getInputClass()
+ public Class<?> getInputClass()
{
return inputClass;
}
Modified: trunk/core/src/classpath/javax/javax/imageio/spi/ImageOutputStreamSpi.java
===================================================================
--- trunk/core/src/classpath/javax/javax/imageio/spi/ImageOutputStreamSpi.java 2007-01-07 05:43:57 UTC (rev 2998)
+++ trunk/core/src/classpath/javax/javax/imageio/spi/ImageOutputStreamSpi.java 2007-01-07 08:19:52 UTC (rev 2999)
@@ -59,7 +59,7 @@
* Indicates which kind of output is produced by the streams
* created by {@link #createOutputStreamInstance(Object)}.
*/
- protected Class outputClass;
+ protected Class<?> outputClass;
/**
@@ -80,7 +80,7 @@
* or <code>version</code> is <code>null</code>.
*/
public ImageOutputStreamSpi(String vendorName, String version,
- Class outputClass)
+ Class<?> outputClass)
{
super(vendorName, version);
this.outputClass = outputClass;
@@ -91,7 +91,7 @@
* Determines which kind of output is produced by the streams
* created by {@link #createOutputStreamInstance(Object)}.
*/
- public Class getOutputClass()
+ public Class<?> getOutputClass()
{
return outputClass;
}
Modified: trunk/core/src/classpath/javax/javax/imageio/spi/RegisterableService.java
===================================================================
--- trunk/core/src/classpath/javax/javax/imageio/spi/RegisterableService.java 2007-01-07 05:43:57 UTC (rev 2998)
+++ trunk/core/src/classpath/javax/javax/imageio/spi/RegisterableService.java 2007-01-07 08:19:52 UTC (rev 2999)
@@ -62,7 +62,7 @@
* @param category the service category for which this provider has
* been registered as an implementor.
*/
- void onRegistration(ServiceRegistry registry, Class category);
+ void onRegistration(ServiceRegistry registry, Class<?> category);
/**
@@ -78,6 +78,6 @@
* @param category the service category for which this provider has
* been registered as an implementor.
*/
- void onDeregistration(ServiceRegistry registry, Class category);
+ void onDeregistration(ServiceRegistry registry, Class<?> category);
}
Modified: trunk/core/src/classpath/javax/javax/imageio/spi/ServiceRegistry.java
===================================================================
--- trunk/core/src/classpath/javax/javax/imageio/spi/ServiceRegistry.java 2007-01-07 05:43:57 UTC (rev 2998)
+++ trunk/core/src/classpath/javax/javax/imageio/spi/ServiceRegistry.java 2007-01-07 08:19:52 UTC (rev 2999)
@@ -121,7 +121,7 @@
* @throws ClassCastException if <code>categories</code> does not
* iterate over instances of {@link java.lang.Class}.
*/
- public ServiceRegistry(Iterator categories)
+ public ServiceRegistry(Iterator<Class<?>> categories)
{
ArrayList cats = new ArrayList(/* expected size */ 10);
@@ -178,7 +178,7 @@
* @throws IllegalArgumentException if <code>spi</code> is
* <code>null</code>.
*/
- public static Iterator lookupProviders(Class spi,
+ public static <T> Iterator<T> lookupProviders(Class<T> spi,
ClassLoader loader)
{
return ServiceFactory.lookupProviders(spi, loader);
@@ -200,7 +200,7 @@
*
* @see #lookupProviders(Class, ClassLoader)
*/
- public static Iterator lookupProviders(Class spi)
+ public static <T> Iterator<T> lookupProviders(Class<T> spi)
{
return ServiceFactory.lookupProviders(spi);
}
@@ -212,7 +212,7 @@
* @return an unmodifiable {@link
* java.util.Iterator}<{@link java.lang.Class}>.
*/
- public Iterator getCategories()
+ public Iterator<Class<?>> getCategories()
{
return new Iterator()
{
@@ -317,8 +317,8 @@
* @throws ClassCastException if <code>provider</code> does not
* implement <code>category</code>.
*/
- public synchronized boolean registerServiceProvider(Object provider,
- Class category)
+ public synchronized <T> boolean registerServiceProvider(T provider,
+ ...
[truncated message content] |