public abstract class TransformerBuilder extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Map<Config,String> |
configs |
protected Boolean |
verbose |
| Modifier | Constructor and Description |
|---|---|
protected |
TransformerBuilder() |
| Modifier and Type | Method and Description |
|---|---|
ArchiveTransformer |
build()
Creates new resource transformer and closes this builder instance.
|
protected abstract ArchiveTransformer |
buildInternal()
Creates new transformer instance.
|
TransformerBuilder |
setConfiguration(Config configType,
String configLocation)
Adds custom configuration mapping defined in a configuration file.
|
TransformerBuilder |
setVerbose(boolean verbose)
Sets verbosity of underlying transformation engine.
|
public final TransformerBuilder setConfiguration(Config configType, String configLocation)
configType - configuration file typeconfigLocation - configuration file location on class pathConcurrentModificationException - if this builder instance is used by multiple threadsIllegalStateException - if either build() or this method (with given config type) have been already calledIllegalArgumentException - if method parameter is null
or if method parameter equals to empty stringpublic final TransformerBuilder setVerbose(boolean verbose)
verbose - if output should be verbose or notpublic final ArchiveTransformer build() throws IOException
ConcurrentModificationException - if this builder instance is used by multiple threadsIllegalStateException - if this method have been already called or
there was no packages mapping defined in configuration file or
if packages mapping count in configuration file surpasses value 65535IllegalArgumentException - if configuration file has invalid format or it contains identical package mapping
or if some package defined in one package mapping is a substring of package in another package mappingIOException - if configuration reading process failed with unexpected I/O errorprotected abstract ArchiveTransformer buildInternal() throws IOException
IOExceptionCopyright © 2020 JBoss by Red Hat. All rights reserved.