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

org.sklsft.commons.mapper.impl.StringArrayToBeanMapperImpl Maven / Gradle / Ivy

There is a newer version: 5.0.0-M1
Show newest version
package org.sklsft.commons.mapper.impl;

import org.sklsft.commons.mapper.beans.AccessibleField;
import org.sklsft.commons.mapper.beans.MappableBean;
import org.sklsft.commons.mapper.beans.MappableBeanFactory;
import org.sklsft.commons.mapper.interfaces.ObjectArrayToBeanMapper;

/**
 * Enables the copy of a bean from an object array
 * The object array is here assumed to be a string array
 * @author Nicolas Thibault
 *
 * @param 
 */
public class StringArrayToBeanMapperImpl implements ObjectArrayToBeanMapper {
	
	private final MappableBean mappableBean;
	
	public StringArrayToBeanMapperImpl (Class clazz) {
		mappableBean = MappableBeanFactory.getMappableBean(clazz);
	}

	@Override
	public T mapFrom(T obj, Object[] stringArray, int startField) {
		
		for (int i = 0;i




© 2015 - 2024 Weber Informatics LLC | Privacy Policy