org.sklsft.commons.mapper.impl.ObjectArrayToBeanMapperImpl Maven / Gradle / Ivy
package org.sklsft.commons.mapper.impl;
import java.math.BigDecimal;
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
* @author Nicolas Thibault
*
* @param
*/
public class ObjectArrayToBeanMapperImpl implements ObjectArrayToBeanMapper {
private final MappableBean mappableBean;
public ObjectArrayToBeanMapperImpl (Class clazz) {
mappableBean = MappableBeanFactory.getMappableBean(clazz);
}
@Override
public T mapFrom(T obj, Object[] objectArray, int startField) {
for (int i = 0;i