Class ProviderLoader

java.lang.Object
io.github.dinethdilhara.urltoproduct.engine.ProviderLoader

public class ProviderLoader extends Object
ProviderLoader

Loads all available ProductProvider implementations using Java's ServiceLoader mechanism.

This enables a pluggable architecture where new providers (e.g. Amazon, AliExpress) can be added without modifying core code.

How it works:
  • Scans classpath for registered providers
  • Instantiates each provider
  • Returns a list of available providers
Version:
1.0.0
Author:
Dineth Dilhara
  • Constructor Details

    • ProviderLoader

      public ProviderLoader()
  • Method Details

    • load

      public static List<ProductProvider> load()
      Loads all ProductProvider implementations.
      Returns:
      list of discovered providers (may be empty if none found)