Class ClassMetadataProvider
java.lang.Object
dev.langchain4j.classloading.ClassMetadataProvider
Utility class for returning metadata about a class and its methods. Intended to allow downstream frameworks (like Quarkus
or Spring) to use their own mechanisms for providing this information.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <MethodKey>
ClassMetadataProviderFactory<MethodKey> Retrieves an implementation of aClassMetadataProviderFactory.
-
Method Details
-
getClassMetadataProviderFactory
Retrieves an implementation of aClassMetadataProviderFactory. This method first looks for implementations of the factory via theServiceLoader. It filters out the default factory implementation (ReflectionBasedClassMetadataProviderFactory) to allow for custom implementations provided by external frameworks. If no custom implementations are available, the method returns the default factory.- Type Parameters:
MethodKey- The type of the method key, representing a unique identifier for methods.- Returns:
- An instance of
ClassMetadataProviderFactoryeither provided by an external framework or falling back to the default implementation.
-