Class BuildResult

java.lang.Object
io.quarkus.builder.BuildResult

public final class BuildResult extends Object
The final result of a successful deployment operation.
Author:
David M. Lloyd
  • Constructor Details

  • Method Details

    • consume

      public <T extends SimpleBuildItem> T consume(Class<T> type)
      Consume the value produced for the named item.
      Parameters:
      type - the item type (must not be null)
      Returns:
      the produced item (may be null)
      Throws:
      IllegalArgumentException - if this deployer was not declared to consume type, or if type is null
      ClassCastException - if the cast failed
    • consumeOptional

      public <T extends SimpleBuildItem> T consumeOptional(Class<T> type)
      Consume the value produced for the named item.
      Parameters:
      type - the item type (must not be null)
      Returns:
      the produced item (may be null)
      Throws:
      ClassCastException - if the cast failed
    • consumeMulti

      public <T extends MultiBuildItem> List<T> consumeMulti(Class<T> type)
      Consume all the values produced for the named item.
      Parameters:
      type - the item element type (must not be null)
      Returns:
      the produced items (may be empty, will not be null)
      Throws:
      IllegalArgumentException - if this deployer was not declared to consume type
    • getDiagnostics

      public List<Diagnostic> getDiagnostics()
      Get the diagnostics reported during build.
      Returns:
      the diagnostics reported during build
    • getDuration

      public long getDuration(TimeUnit timeUnit)
      Get the amount of elapsed time from the time the operation was initiated to the time it was completed.
      Parameters:
      timeUnit - the time unit to return
      Returns:
      the time
    • getMetrics

      public BuildMetrics getMetrics()
      Returns:
      the build metrics
    • closeAll

      public void closeAll() throws RuntimeException
      Close all the resultant resources, logging any failures.
      Throws:
      RuntimeException