-
@Documented @Inherited @Retention(RUNTIME) @Target(TYPE) @Service(value=ClasspathFirst.class, meta=true) public @interface ClasspathFirst
Annotation to override a service on the modulepath from the classpath.By default, the
ModuleSorterorganizes 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 java.lang.Class<?>valueGets the serviced class.
-