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

com.github.nill14.utils.init.scope.SingletonScope Maven / Gradle / Ivy

The newest version!
package com.github.nill14.utils.init.scope;

import javax.inject.Provider;

import com.github.nill14.utils.init.api.BindingKey;
import com.github.nill14.utils.init.api.IScope;
import com.github.nill14.utils.init.api.IScopeContext;

public class SingletonScope implements IScope {

	private final ScopeContext context = new ScopeContext();
	
	private SingletonScope() {
	}

	@Override
	public  Provider scope(BindingKey type, Provider unscoped, IScopeContext scopeContext) {
		return context.scope(type, unscoped);
	}
	
	
	
	private static final SingletonScope INSTANCE = new SingletonScope();
	public static final SingletonScope instance() {
		return INSTANCE;
	}

	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy