Class ServiceRegistryClassInstanceFactory
java.lang.Object
io.helidon.integrations.langchain4j.ServiceRegistryClassInstanceFactory
- All Implemented Interfaces:
dev.langchain4j.spi.classloading.ClassInstanceFactory
public class ServiceRegistryClassInstanceFactory
extends Object
implements dev.langchain4j.spi.classloading.ClassInstanceFactory
LangChain4j ClassInstanceFactory implementation
that retrieves instances of classes from Helidon global
Services registry.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newServiceRegistryClassInstanceFactory. -
Method Summary
Modifier and TypeMethodDescription<T> TgetInstanceOfClass(Class<T> clazz) Retrieves an instance of the given class from the HelidonServicesregistry.
-
Constructor Details
-
ServiceRegistryClassInstanceFactory
public ServiceRegistryClassInstanceFactory()Constructs a newServiceRegistryClassInstanceFactory.
-
-
Method Details
-
getInstanceOfClass
Retrieves an instance of the given class from the HelidonServicesregistry.- Specified by:
getInstanceOfClassin interfacedev.langchain4j.spi.classloading.ClassInstanceFactory- Type Parameters:
T- the type of the class- Parameters:
clazz- the class to retrieve an instance of- Returns:
- an instance of the requested class, or
nullif not found
-