Class ServiceIndexGenerator.Request.Builder
java.lang.Object
io.micronaut.aot.serviceindex.ServiceIndexGenerator.Request.Builder
- Enclosing class:
ServiceIndexGenerator.Request
- Since:
- 3.2.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the request.Adds the next entry of the class path the application runs with, without a runtime name: the index then lists no class path, and micronaut-core does not compare it at run time.Adds the next entry of the class path the application runs with, and the file name it has when the application runs, which micronaut-core compares at run time: seeentry(Path).The entry of the class path that the caller writes theServiceIndexGenerator.Resultinto: the application's jar, or its class directory.
-
Method Details
-
entry
Adds the next entry of the class path the application runs with, without a runtime name: the index then lists no class path, and micronaut-core does not compare it at run time. That is for a packaging that cannot know the names its files have when the application runs, such as Micronaut Runner's.Give the entries in the order of the class path at run time, as files of the machine that builds, once nothing changes them any more: for
java -jar, the jar, then the entries of its manifestClass-Paththat exist when the application runs. The class path cannot mix entries with and without a runtime name.- Parameters:
file- a jar or a directory- Returns:
- this builder
-
entry
Adds the next entry of the class path the application runs with, and the file name it has when the application runs, which micronaut-core compares at run time: seeentry(Path). A jar renamed after this step makes micronaut-core set the index aside, with aWARNon every start.- Parameters:
file- a jar or a directoryruntimeName- the entry's file name when the application runs, such asapplication.jar- Returns:
- this builder
-
holder
The entry of the class path that the caller writes theServiceIndexGenerator.Resultinto: the application's jar, or its class directory. A class directory must be a copy that only the packaged application uses, neverbuild/classesortarget/classes, which run tasks, tests and IDEs share: micronaut-core does not compare the content of a directory, so a bean compiled after this step would not be found. Required.- Parameters:
entry- one of the entries- Returns:
- this builder
-
build
Builds the request.- Returns:
- the request
- Throws:
IllegalStateException- if there is no entry or no holder, the holder is not an entry, an entry is given twice, or only some entries have a runtime name
-