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

org.mentacontainer.impl.SingletonFactory Maven / Gradle / Ivy

Go to download

A IOC container as simple and pragmatic as it can get with programmatic configuration through a Fluent API.

There is a newer version: 1.2.6
Show newest version
package org.mentacontainer.impl;

import org.mentacontainer.Factory;

public class SingletonFactory implements Factory {
	
	private final Object instance;
	
	private final Class type;
	
	
	public SingletonFactory(Object instance) {

		this.instance = instance;
		
		this.type = instance.getClass();
	}
	
	@Override
	public  T getInstance()  {
		
		return (T) instance;
	}
	
	@Override
	public Class getType() {
		
		return type;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy