public final class BuildResult extends Object
| Constructor and Description |
|---|
BuildResult(ConcurrentHashMap<ItemId,BuildItem> simpleItems,
ConcurrentHashMap<ItemId,List<BuildItem>> multiItems,
Set<ItemId> finalIds,
List<Diagnostic> diagnostics,
long nanos) |
| Modifier and Type | Method and Description |
|---|---|
void |
closeAll()
Close all the resultant resources, logging any failures.
|
<T extends SimpleBuildItem> |
consume(Class<T> type)
Consume the value produced for the named item.
|
<T extends MultiBuildItem> |
consumeMulti(Class<T> type)
Consume all of the values produced for the named item.
|
<T extends SimpleBuildItem> |
consumeOptional(Class<T> type)
Consume the value produced for the named item.
|
List<Diagnostic> |
getDiagnostics()
Get the diagnostics reported during build.
|
long |
getDuration(TimeUnit timeUnit)
Get the amount of elapsed time from the time the operation was initiated to the time it was completed.
|
BuildResult(ConcurrentHashMap<ItemId,BuildItem> simpleItems, ConcurrentHashMap<ItemId,List<BuildItem>> multiItems, Set<ItemId> finalIds, List<Diagnostic> diagnostics, long nanos)
public <T extends SimpleBuildItem> T consume(Class<T> type)
type - the item type (must not be null)null)IllegalArgumentException - if this deployer was not declared to consume type, or if type is
nullClassCastException - if the cast failedpublic <T extends SimpleBuildItem> T consumeOptional(Class<T> type)
type - the item type (must not be null)null)ClassCastException - if the cast failedpublic <T extends MultiBuildItem> List<T> consumeMulti(Class<T> type)
type - the item element type (must not be null)null)IllegalArgumentException - if this deployer was not declared to consume typepublic List<Diagnostic> getDiagnostics()
public long getDuration(TimeUnit timeUnit)
timeUnit - the time unit to returnpublic void closeAll()
throws RuntimeException
RuntimeExceptionCopyright © 2021 JBoss by Red Hat. All rights reserved.