Package io.quarkus.deployment.dev
Class RecompilationDependenciesBuildItem
java.lang.Object
io.quarkus.builder.item.BuildItem
io.quarkus.builder.item.MultiBuildItem
io.quarkus.deployment.dev.RecompilationDependenciesBuildItem
public final class RecompilationDependenciesBuildItem
extends io.quarkus.builder.item.MultiBuildItem
Defines the relationship between classes for the purposes of recompilation.
Idea is that multiple classes can be dependent on one other class. For this BuildItem a class can be an outermost class, a
nested class, an annotation, an interface, an enum, or basically anything that has an FQN.
A consolidation step in
RecompilationDependenciesProcessor cleans up the collected recompilation dependencies and
removes duplicates.
The collected recompilation dependencies are used to build a relationship tree between the classes in the
RuntimeUpdatesProcessor, which is build and traversed from the root up and outwards. Class a -> Set of Class -> where
each element class can resolve to another set of classes.
The collected recompilation dependencies are used to determine the set of classes which need to additionally be recompiled
when one other class changes.
For performance reasons, the scope of the collected recompilation dependencies should be quite narrow. For an
example, the quarkus-mapstruct extension uses this BuildItem to recompile the dependent Mapper classes, once any of the
referenced model classes
changes.-
Constructor Summary
ConstructorsConstructorDescriptionRecompilationDependenciesBuildItem(Map<org.jboss.jandex.DotName, Set<org.jboss.jandex.DotName>> classToRecompilationTargets) -
Method Summary
Modifier and TypeMethodDescriptionReturns the map of recompilation dependencies.
-
Constructor Details
-
RecompilationDependenciesBuildItem
-
-
Method Details
-
getClassToRecompilationTargets
Returns the map of recompilation dependencies.The key is a dependency class name, while the value is a set of dependent class names that need to be recompiled as well when the dependency class changes.
- Returns:
- a map where each key is a dependency class name and each value is a set of class names that depend on it
-