Class ClassMetadataProvider

java.lang.Object
dev.langchain4j.classloading.ClassMetadataProvider

public final class ClassMetadataProvider extends Object
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 Details

    • getClassMetadataProviderFactory

      public static <MethodKey> ClassMetadataProviderFactory<MethodKey> getClassMetadataProviderFactory()
      Retrieves an implementation of a ClassMetadataProviderFactory. This method first looks for implementations of the factory via the ServiceLoader. 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 ClassMetadataProviderFactory either provided by an external framework or falling back to the default implementation.