
se.l4.commons.serialization.spi.InstanceFactory Maven / Gradle / Ivy
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