B
- the type of SCMSourceBuilder
.S
- the type of SCMSource
.public abstract class SCMSourceDecorator<B extends SCMSourceBuilder<B,S>,S extends SCMSource> extends Object
SCMSourceBuilder
instances that can be used by a SCMNavigatorTrait
for
example to apply SCMSourceTrait
s to a subset of projects.Modifier | Constructor and Description |
---|---|
protected |
SCMSourceDecorator()
Infers the type of the corresponding
SCMSourceBuilder from the type parameters of the implementation
class. |
protected |
SCMSourceDecorator(Class<B> builderClass)
Bypasses
SCMSourceBuilder type inference and specifies the type explicitly. |
Modifier and Type | Method and Description |
---|---|
void |
applyTo(SCMSourceBuilder<?,?> builder,
String projectName)
Applies this decorator to the specified
SCMSourceBuilder for the supplied project name. |
protected abstract void |
decorate(B builder,
String projectName)
SPI: decorate the supplied builder for creation of the named project.
|
protected SCMSourceDecorator()
SCMSourceBuilder
from the type parameters of the implementation
class. If the inference fails use SCMSourceDecorator(Class)
.protected SCMSourceDecorator(Class<B> builderClass)
SCMSourceBuilder
type inference and specifies the type explicitly.builderClass
- the specialization of SCMSourceBuilder
that this decorator applies to.public final void applyTo(SCMSourceBuilder<?,?> builder, String projectName)
SCMSourceBuilder
for the supplied project name.
If this SCMSourceDecorator
is not specialized for the type of SCMSourceBuilder
then this will
be a no-op.builder
- the SCMSourceBuilder
.projectName
- the project name.Copyright © 2016–2022. All rights reserved.