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

se.l4.commons.serialization.spi.InstanceFactory Maven / Gradle / Ivy

There is a newer version: 0.4.2
Show newest version
package se.l4.commons.serialization.spi;

import java.lang.annotation.Annotation;

/**
 * Factory for instances, used to support dependency injection if available.
 * 
 * @author Andreas Holstenson
 *
 */
public interface InstanceFactory
{
	/**
	 * Create the specified type.
	 * 
	 * @param 
	 * @param type
	 * @return
	 */
	 T create(Class type);
	
	/**
	 * Create the specified type using the given annotation as hints.
	 * 
	 * @param type
	 * @param annotations
	 * @return
	 */
	 T create(Class type, Annotation[] annotations);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy