001package org.picocontainer.converters;
002
003import org.picocontainer.PicoCompositionException;
004
005import java.net.MalformedURLException;
006import java.net.URL;
007
008/**
009 * Converts values to URL data type objects
010 * 
011 * @author Paul Hammant
012 * @author Michael Rimov
013 */
014public class UrlConverter implements Converter<URL> {
015
016    public URL convert(String paramValue) {
017        try {
018            return new URL(paramValue);
019        } catch (MalformedURLException e) {
020            throw new PicoCompositionException(e);
021        }
022    }
023}