/*
 * $Id: IdentifierListConverter.java 220 2007-07-16 10:32:15Z sugimotokenichi $
 * Copyright (C) 2006 SUGIMOTO Ken-ichi
 * 作成日: 2006/03/22
 */
package feat2.config.type;

import org.apache.commons.beanutils.ConversionException;
import org.apache.commons.beanutils.Converter;

/**
 * 識別子へのコンバータ。
 * @author SUGIMOTO Ken-ichi
 */
public class IdentifierListConverter implements Converter {

    public Object convert(Class type, Object value) {

        if ( value == null )
            throw new ConversionException("null");

        try {

            return new IdentifierList(value.toString());

        }

        catch (IllegalArgumentException ex) {
            throw new ConversionException(ex);
        }

    }

}
