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

org.beanone.flattener.DefaultUnflattener Maven / Gradle / Ivy

Go to download

A utility library that allows one to turn a JavaBean into a flat Map of attributes

The newest version!
package org.beanone.flattener;

import java.lang.reflect.InvocationTargetException;
import java.util.Map;

import org.beanone.flattener.api.KeyStack;

public class DefaultUnflattener extends AbstractUnflattener {

	public DefaultUnflattener(FlattenerRegistryImpl flattenerRegistryImpl) {
		super(flattenerRegistryImpl);
	}

	@Override
	protected Object doCreateObject(Map flatted,
	        KeyStack keyStack, Class clazz)
	        throws InstantiationException, IllegalAccessException {
		return getUtil().createObject(clazz);
	}

	@Override
	protected void doPopulate(Object object, String key, int suffixSize,
	        Object value)
	        throws IllegalAccessException, InvocationTargetException {
		getUtil().populate(object, key, suffixSize, value);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy