Annotation Interface ClasspathFirst


Annotation to override a service on the modulepath from the classpath.

By default, the ModuleSorter organizes resources for the same service name according to the module dependency hierarchy first and then followed by the automatic modules and classpath. This is the desired behavior in most cases, since it allows modules to override/implement services declared or already implemented by real modules or traditional artifacts.
This would mean, however, that a non-modularized dependency could never override a service from a real module. Think of maven artifacts that in turn depend on some 3rd party dependency that isn't modularized yet.
In such cases, this annotation causes the classpath to take precedence over the modulepath.

For an example, see PoiTableUtilities in tentackle-fx-rdc-poi.

Author:
harald
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Gets the serviced class.
  • Element Details

    • value

      Class<?> value
      Gets the serviced class.
      Returns:
      the serviced class