Package io.quarkus.deployment.index
Class LazyIndexer
java.lang.Object
io.quarkus.deployment.index.LazyIndexer
A lazy creator of a Jandex
Index. It reads class data from a given class loader
and skips classes that are present in the given existing Jandex index.
Expected usage:
- Create an instance:
new LazyIndexer(classLoader, existingIndex) - Add class names to be indexed lazily:
add(className),addAll(classNames) - Run the indexing process:
var result = indexer.complete()
complete(), the instance should be thrown away.
The resulting index is expected to be combined with the given existing index using
a CompositeIndex or StackedIndex.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA result of lazy indexing process. -
Constructor Summary
ConstructorsConstructorDescriptionLazyIndexer(ClassLoader classLoader, org.jboss.jandex.IndexView existingIndex) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the givenclassNameto the set of classes to be indexed lazily.voidAdds the givenclassNameto the set of classes to be indexed lazily.voidaddAll(Collection<String> classNames) Adds all givenclassNamesto the set of classes to be indexed lazily.complete()Runs the indexing process.
-
Constructor Details
-
LazyIndexer
-
-
Method Details
-
add
Adds the givenclassNameto the set of classes to be indexed lazily.The given class, all its superclasses, and all annotations found on the class and its superclasses will be indexed.
-
addAll
Adds all givenclassNamesto the set of classes to be indexed lazily.The given classes, all their superclasses, and all annotations found on the classes and their superclasses will be indexed.
-
add
Adds the givenclassNameto the set of classes to be indexed lazily. The class data will not be obtained from the class loader; instead, the givenclassDatawill be used.The given class and all annotations found on it will be indexed. Unlike the other
addmethods, superclasses will not be indexed.If the same class name has already been added with different class data, an exception is thrown.
-
complete
Runs the indexing process. All classes added viaadd()are indexed and theLazyIndexer.Resultis returned. If a class is not found in the class loader, an exception is thrown, unless it is a class of an annotation that is present on one of the previously indexed classes.
-