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

io.datakernel.di.impl.CompiledBinding Maven / Gradle / Ivy

package io.datakernel.di.impl;

import java.util.concurrent.atomic.AtomicReferenceArray;

public interface CompiledBinding {
	R getInstance(AtomicReferenceArray[] scopedInstances, int synchronizedScope);

	R createInstance(AtomicReferenceArray[] scopedInstances, int synchronizedScope);

	@SuppressWarnings("unchecked")
	static  CompiledBinding missingOptionalBinding() {
		return (CompiledBinding) MISSING_OPTIONAL_BINDING;
	}

	CompiledBinding MISSING_OPTIONAL_BINDING = new CompiledBinding() {
		@Override
		public Object getInstance(AtomicReferenceArray[] scopedInstances, int synchronizedScope) {
			return null;
		}

		@Override
		public Object createInstance(AtomicReferenceArray[] scopedInstances, int synchronizedScope) {
			return null;
		}
	};
}