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

net.sf.juffrou.reflect.internal.DefaultBeanInstanceCreator Maven / Gradle / Ivy

Go to download

Performant java bean access through property names. If you are serious about bean handling, this is for you.

There is a newer version: 2.1.9
Show newest version
package net.sf.juffrou.reflect.internal;

import net.sf.juffrou.reflect.BeanInstanceBuilder;
import net.sf.juffrou.reflect.error.BeanInstanceBuilderException;

public class DefaultBeanInstanceCreator implements BeanInstanceBuilder {

	@Override
	public Object build(Class clazz) throws BeanInstanceBuilderException {
		Object instance;
		try {
			instance = clazz.newInstance();
		} catch (InstantiationException e) {
			throw new BeanInstanceBuilderException(e);
		} catch (IllegalAccessException e) {
			throw new BeanInstanceBuilderException(e);
		}
		return instance;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy