Package hzg.wpn.util.conveter

Examples of hzg.wpn.util.conveter.TypeConverter


            for (Field fld : scheme.getDeclaredFields()) {
                Property propertyDesc = fld.getAnnotation(Property.class);
                if (propertyDesc == null) continue;

                Class<?> type = fld.getType();
                TypeConverter converter = TypeConverters.lookupStringToTypeConverter(type);
                String key = !propertyDesc.value().isEmpty() ? propertyDesc.value() : fld.getName();

                if (properties.get(key) == null) continue;

                Object src = properties.get(key);
                fld.set(container, converter.convert(src));
            }

            return container;
        } catch (InstantiationException e) {
            throw new RuntimeException(e);
View Full Code Here

TOP

Related Classes of hzg.wpn.util.conveter.TypeConverter

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.