All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.picocontainer.converters.UrlConverter Maven / Gradle / Ivy

package org.picocontainer.converters;

import org.picocontainer.PicoCompositionException;

import java.net.MalformedURLException;
import java.net.URL;

/**
 * Converts values to URL data type objects
 * 
 * @author Paul Hammant
 * @author Michael Rimov
 */
public class UrlConverter implements Converter {

    public URL convert(String paramValue) {
        try {
            return new URL(paramValue);
        } catch (MalformedURLException e) {
            throw new PicoCompositionException(e);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy