Package io.quarkus.flyway.deployment
Class FlywayCallbacksLocator
java.lang.Object
io.quarkus.flyway.deployment.FlywayCallbacksLocator
Logic to locate and process Flyway
Callback classes.
This class also helps to keep the FlywayProcessor class as lean as possible to make it easier to maintain-
Method Summary
Modifier and TypeMethodDescriptionMap<String,Collection<org.flywaydb.core.api.callback.Callback>> Main logic to identify callbacks and return them to be processed by theFlywayProcessorstatic FlywayCallbacksLocatorwith(Collection<String> dataSourceNames, FlywayBuildTimeConfig flywayBuildConfig, CombinedIndexBuildItem combinedIndexBuildItem, BuildProducer<ReflectiveClassBuildItem> reflectiveClassProducer)
-
Method Details
-
with
public static FlywayCallbacksLocator with(Collection<String> dataSourceNames, FlywayBuildTimeConfig flywayBuildConfig, CombinedIndexBuildItem combinedIndexBuildItem, BuildProducer<ReflectiveClassBuildItem> reflectiveClassProducer) -
getCallbacks
public Map<String,Collection<org.flywaydb.core.api.callback.Callback>> getCallbacks() throws ClassNotFoundException, InvocationTargetException, InstantiationException, IllegalAccessExceptionMain logic to identify callbacks and return them to be processed by theFlywayProcessor- Returns:
- Map containing the callbacks for each datasource. The datasource name is the map key
- Throws:
ClassNotFoundException- if theCallbackclass cannot be located by the Quarkus class loaderInstantiationException- if theCallbackclass represents an abstract class.InvocationTargetException- if the underlying constructor throws an exception.IllegalAccessException- if theCallbackconstructor is enforcing Java language access control and the underlying constructor is inaccessible
-