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

com.jpattern.ioc.xml.KeyConverter Maven / Gradle / Ivy

There is a newer version: 2.7.1
Show newest version
package com.jpattern.ioc.xml;

import com.thoughtworks.xstream.converters.SingleValueConverter;

public class KeyConverter implements SingleValueConverter {

    public Object fromString(String aKey) {
        return new Key(aKey);
    }

    public String toString(Object aObjectKey) {
        return ((Key) aObjectKey).key();
    }

	@SuppressWarnings("rawtypes")
	public boolean canConvert(Class aClassType) {
        return aClassType.equals(Key.class);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy