Package org.apache.wicket.util.convert.converter

Examples of org.apache.wicket.util.convert.converter.AbstractConverter


        converters.put(Long.class, new LongConverter());
    }

    @SuppressWarnings("unchecked")
    public Object convert(Class<?> type, String object) {
        AbstractConverter abstractConverter;
        if (Enum.class.isAssignableFrom(type)) {
            abstractConverter = new EnumConverter((Class<? extends Enum>) type);
        } else {
            abstractConverter = converters.get(type);
        }
        if (abstractConverter != null) {
            return abstractConverter.convertToObject(object, Locale.getDefault());
        } else {
            return object;
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.wicket.util.convert.converter.AbstractConverter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.