com.jpattern.ioc.xml.ClassNameConverter Maven / Gradle / Ivy
package com.jpattern.ioc.xml;
import com.thoughtworks.xstream.converters.SingleValueConverter;
/**
*
* @author Claudio Quaresima - [email protected] - 23/ott/08 17:53:23
* @version $Id: $
*/
public class ClassNameConverter implements SingleValueConverter {
public Object fromString(String aClassName) {
return new ClassName(aClassName);
}
public String toString(Object aClassNameObject) {
return ((ClassName) aClassNameObject).classname();
}
@SuppressWarnings("rawtypes")
public boolean canConvert(Class aClassType) {
return aClassType.equals(ClassName.class);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy