Package io.quarkus.builder
Class BuildStepBuilder
- java.lang.Object
-
- io.quarkus.builder.BuildStepBuilder
-
public final class BuildStepBuilder extends Object
A builder for build step instances within a chain. A build step can consume and produce items. It may also register a destructor for items it produces, which will be run (in indeterminate order) at the end of processing.
-
-
Constructor Summary
Constructors Constructor Description BuildStepBuilder(BuildChainBuilder buildChainBuilder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BuildStepBuilderafterProduce(Class<? extends BuildItem> type)This build step should be initiated after any build steps which produce the given itemtypeare completed.BuildStepBuilderbeforeConsume(Class<? extends BuildItem> type)This build step should complete before any build steps which consume the given itemtypeare initiated.BuildStepBuilderbeforeConsume(Class<? extends BuildItem> type, ProduceFlag flag)This build step should complete before any build steps which consume the given itemtypeare initiated.BuildChainBuilderbuild()Build this step into the chain.BuildChainBuilderbuildIf(BooleanSupplier supp)Build this step into the chain if the supplier returnstrue.BuildStepBuilderconsumes(Class<? extends BuildItem> type)This build step consumes the given produced item.BuildStepBuilderconsumes(Class<? extends BuildItem> type, ConsumeFlags flags)This build step consumes the given produced item.(package private) BuildStepgetBuildStep()(package private) Map<ItemId,Consume>getConsumes()(package private) Map<ItemId,Produce>getProduces()(package private) Set<ItemId>getRealConsumes()(package private) Set<ItemId>getRealProduces()BuildStepBuilderproduces(Class<? extends BuildItem> type)Similarly tobeforeConsume(Class), establish that this build step must come before the consumer(s) of the given itemtype; however, only oneproducermay exist for the given item.BuildStepBuilderproduces(Class<? extends BuildItem> type, ProduceFlag flag)Similarly tobeforeConsume(Class), establish that this build step must come before the consumer(s) of the given itemtype; however, only oneproducermay exist for the given item.BuildStepBuilderproduces(Class<? extends BuildItem> type, ProduceFlag flag1, ProduceFlag flag2)Similarly tobeforeConsume(Class), establish that this build step must come before the consumer(s) of the given itemtype; however, only oneproducermay exist for the given item.BuildStepBuilderproduces(Class<? extends BuildItem> type, ProduceFlags flags)Similarly tobeforeConsume(Class), establish that this build step must come before the consumer(s) of the given itemtype; however, only oneproducermay exist for the given item.BuildStepBuildersetBuildStep(BuildStep buildStep)Set the build step for this builder.StringtoString()
-
-
-
Constructor Detail
-
BuildStepBuilder
BuildStepBuilder(BuildChainBuilder buildChainBuilder)
-
-
Method Detail
-
setBuildStep
public BuildStepBuilder setBuildStep(BuildStep buildStep)
Set the build step for this builder. If no build step is specified, then this step will be excluded from the final chain.- Parameters:
buildStep- the build step- Returns:
- this builder
-
beforeConsume
public BuildStepBuilder beforeConsume(Class<? extends BuildItem> type)
This build step should complete before any build steps which consume the given itemtypeare initiated. If no such build steps exist, no ordering constraint is enacted.- Parameters:
type- the item type (must not benull)- Returns:
- this builder
-
beforeConsume
public BuildStepBuilder beforeConsume(Class<? extends BuildItem> type, ProduceFlag flag)
This build step should complete before any build steps which consume the given itemtypeare initiated. If no such build steps exist, no ordering constraint is enacted.- Parameters:
type- the item type (must not benull)flag- the producer flag to apply (must not benull)- Returns:
- this builder
-
afterProduce
public BuildStepBuilder afterProduce(Class<? extends BuildItem> type)
This build step should be initiated after any build steps which produce the given itemtypeare completed. If no such build steps exist, no ordering constraint is enacted.- Parameters:
type- the item type (must not benull)- Returns:
- this builder
-
produces
public BuildStepBuilder produces(Class<? extends BuildItem> type)
Similarly tobeforeConsume(Class), establish that this build step must come before the consumer(s) of the given itemtype; however, only oneproducermay exist for the given item. In addition, the build step may produce an actual value for this item, which will be shared to all consumers during deployment.- Parameters:
type- the item type (must not benull)- Returns:
- this builder
-
produces
public BuildStepBuilder produces(Class<? extends BuildItem> type, ProduceFlag flag)
Similarly tobeforeConsume(Class), establish that this build step must come before the consumer(s) of the given itemtype; however, only oneproducermay exist for the given item. In addition, the build step may produce an actual value for this item, which will be shared to all consumers during deployment.- Parameters:
type- the item type (must not benull)flag- the producer flag to apply (must not benull)- Returns:
- this builder
-
produces
public BuildStepBuilder produces(Class<? extends BuildItem> type, ProduceFlag flag1, ProduceFlag flag2)
Similarly tobeforeConsume(Class), establish that this build step must come before the consumer(s) of the given itemtype; however, only oneproducermay exist for the given item. In addition, the build step may produce an actual value for this item, which will be shared to all consumers during deployment.- Parameters:
type- the item type (must not benull)flag1- the first producer flag to apply (must not benull)flag2- the second producer flag to apply (must not benull)- Returns:
- this builder
-
produces
public BuildStepBuilder produces(Class<? extends BuildItem> type, ProduceFlags flags)
Similarly tobeforeConsume(Class), establish that this build step must come before the consumer(s) of the given itemtype; however, only oneproducermay exist for the given item. In addition, the build step may produce an actual value for this item, which will be shared to all consumers during deployment.- Parameters:
type- the item type (must not benull)flags- the producer flag to apply (must not benull)- Returns:
- this builder
-
consumes
public BuildStepBuilder consumes(Class<? extends BuildItem> type)
This build step consumes the given produced item. The item must be produced somewhere in the chain. If no such producer exists, the chain will not be constructed; instead, an error will be raised.- Parameters:
type- the item type (must not benull)- Returns:
- this builder
-
consumes
public BuildStepBuilder consumes(Class<? extends BuildItem> type, ConsumeFlags flags)
This build step consumes the given produced item. The item must be produced somewhere in the chain. If no such producer exists, the chain will not be constructed; instead, an error will be raised.- Parameters:
type- the item type (must not benull)flags- a set of flags which modify the consume operation (must not benull)- Returns:
- this builder
-
build
public BuildChainBuilder build()
Build this step into the chain.- Returns:
- the chain builder that this step was added to
-
buildIf
public BuildChainBuilder buildIf(BooleanSupplier supp)
Build this step into the chain if the supplier returnstrue.- Parameters:
supp- thebooleansupplier (must not benull)- Returns:
- the chain builder that this step was added to, or
nullif it was not added
-
getBuildStep
BuildStep getBuildStep()
-
-