java.lang.Object
org.refcodes.decoupling.Dependency<T>
org.refcodes.decoupling.DependencyBuilder<T>
- Type Parameters:
T
- the generic type of theDependency
.
- All Implemented Interfaces:
Comparable<Dependency<T>>
,ClaimsAccessor
,ClaimsAccessor.ClaimsBuilder<DependencyBuilder<T>>
,ClaimsAccessor.ClaimsMutator
,ClaimsAccessor.ClaimsProperty
,InstanceMetricsAccessor
,InstanceMetricsAccessor.InstanceMetricsBuilder<DependencyBuilder<T>>
,InstanceMetricsAccessor.InstanceMetricsMutator
,InstanceMetricsAccessor.InstanceMetricsProperty
,ProfilesAccessor
,ProfilesAccessor.ProfilesBuilder<DependencyBuilder<T>>
,ProfilesAccessor.ProfilesMutator
,ProfilesAccessor.ProfilesProperty
,TagsAccessor
,TagsAccessor.TagsBuilder<DependencyBuilder<T>>
,TagsAccessor.TagsMutator
,TagsAccessor.TagsProperty
,org.refcodes.mixin.AliasAccessor
,org.refcodes.mixin.AliasAccessor.AliasBuilder<DependencyBuilder<T>>
,org.refcodes.mixin.AliasAccessor.AliasMutator
,org.refcodes.mixin.AliasAccessor.AliasProperty
,org.refcodes.mixin.InstanceAccessor<T>
,org.refcodes.mixin.InstanceAccessor.InstanceBuilder<T,
,DependencyBuilder<T>> org.refcodes.mixin.InstanceAccessor.InstanceMutator<T>
,org.refcodes.mixin.InstanceAccessor.InstanceProperty<T>
,org.refcodes.mixin.Schemable
,org.refcodes.mixin.TypeAccessor<T>
,org.refcodes.mixin.TypeAccessor.TypeBuilder<T,
,DependencyBuilder<T>> org.refcodes.mixin.TypeAccessor.TypeMutator<T>
,org.refcodes.mixin.TypeAccessor.TypeProperty<T>
public class DependencyBuilder<T>
extends Dependency<T>
implements org.refcodes.mixin.AliasAccessor.AliasProperty, org.refcodes.mixin.AliasAccessor.AliasBuilder<DependencyBuilder<T>>, org.refcodes.mixin.TypeAccessor.TypeProperty<T>, org.refcodes.mixin.TypeAccessor.TypeBuilder<T,DependencyBuilder<T>>, org.refcodes.mixin.InstanceAccessor.InstanceProperty<T>, org.refcodes.mixin.InstanceAccessor.InstanceBuilder<T,DependencyBuilder<T>>, ProfilesAccessor.ProfilesProperty, ProfilesAccessor.ProfilesBuilder<DependencyBuilder<T>>, TagsAccessor.TagsProperty, TagsAccessor.TagsBuilder<DependencyBuilder<T>>, InstanceMetricsAccessor.InstanceMetricsProperty, InstanceMetricsAccessor.InstanceMetricsBuilder<DependencyBuilder<T>>, ClaimsAccessor.ClaimsProperty, ClaimsAccessor.ClaimsBuilder<DependencyBuilder<T>>
A
DependencyBuilder
describes a component or module depending on or
required by other components or modules.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.mixin.AliasAccessor
org.refcodes.mixin.AliasAccessor.AliasBuilder<B extends org.refcodes.mixin.AliasAccessor.AliasBuilder<B>>, org.refcodes.mixin.AliasAccessor.AliasMutator, org.refcodes.mixin.AliasAccessor.AliasProperty
Nested classes/interfaces inherited from interface org.refcodes.decoupling.ClaimsAccessor
ClaimsAccessor.ClaimsBuilder<B extends ClaimsAccessor.ClaimsBuilder<B>>, ClaimsAccessor.ClaimsMutator, ClaimsAccessor.ClaimsProperty
Nested classes/interfaces inherited from interface org.refcodes.mixin.InstanceAccessor
org.refcodes.mixin.InstanceAccessor.InstanceBuilder<T extends Object,
B extends org.refcodes.mixin.InstanceAccessor.InstanceBuilder<T, B>>, org.refcodes.mixin.InstanceAccessor.InstanceMutator<T extends Object>, org.refcodes.mixin.InstanceAccessor.InstanceProperty<T extends Object> Nested classes/interfaces inherited from interface org.refcodes.decoupling.InstanceMetricsAccessor
InstanceMetricsAccessor.InstanceMetricsBuilder<B extends InstanceMetricsAccessor.InstanceMetricsBuilder<B>>, InstanceMetricsAccessor.InstanceMetricsMutator, InstanceMetricsAccessor.InstanceMetricsProperty
Nested classes/interfaces inherited from interface org.refcodes.decoupling.ProfilesAccessor
ProfilesAccessor.ProfilesBuilder<B extends ProfilesAccessor.ProfilesBuilder<B>>, ProfilesAccessor.ProfilesMutator, ProfilesAccessor.ProfilesProperty
Nested classes/interfaces inherited from interface org.refcodes.decoupling.TagsAccessor
TagsAccessor.TagsBuilder<B extends TagsAccessor.TagsBuilder<B>>, TagsAccessor.TagsMutator, TagsAccessor.TagsProperty
Nested classes/interfaces inherited from interface org.refcodes.mixin.TypeAccessor
org.refcodes.mixin.TypeAccessor.TypeBuilder<T extends Object,
B extends org.refcodes.mixin.TypeAccessor.TypeBuilder<T, B>>, org.refcodes.mixin.TypeAccessor.TypeMutator<T extends Object>, org.refcodes.mixin.TypeAccessor.TypeProperty<T extends Object> -
Field Summary
Fields inherited from class org.refcodes.decoupling.Dependency
_alias, _claims, _dependencies, _factory, _initializer, _instanceMetrics, _instances, _profiles, _singleton, _tags, _type
-
Constructor Summary
ModifierConstructorDescriptionprotected
Empty constructor for creating an instance of theDependencyBuilder
in which to apply the builder methods to set the desired state.DependencyBuilder
(Class<T> aType) DependencyBuilder
(T aInstance) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
boolean
boolean
boolean
addProfile
(Object aProfile) Adds the given profile to the profiles.boolean
Adds the given tag to the tags.void
void
setClaims
(Collection<Claim> aClaims) Sets theClaim
instances to theDependencyBuilder
instance.void
<F extends org.refcodes.factory.Factory<T>>
voidsetFactory
(Class<F> aFactory) <F extends org.refcodes.factory.Factory<T>>
voidsetFactory
(Class<F> aFactory, String aAlias) <F> void
setFactory
(Class<F> aDependency, Function<F, T> aFactory) <F> void
setFactory
(Class<F> aDependency, Function<F, T> aFactory, String aAlias) <F> void
setFactory
(FactoryClaim<F, T> aFactory) <F extends org.refcodes.factory.Initializer<T>>
voidsetInitializer
(Class<F> aFactory) Sets theInitializerClaim
, being aClaim
dedicated to preprocess theDependency
after instantiation.<F extends org.refcodes.factory.Initializer<T>>
voidsetInitializer
(Class<F> aFactory, String aAlias) Sets theInitializerClaim
, being aClaim
dedicated to preprocess theDependency
after instantiation.<I> void
setInitializer
(Class<I> aDependency, BiFunction<T, I, T> aInitializer) Sets theInitializerClaim
, being aClaim
dedicated to preprocess theDependency
after instantiation.<I> void
setInitializer
(Class<I> aDependency, BiFunction<T, I, T> aInitializer, String aAlias) Sets theInitializerClaim
, being aClaim
dedicated to preprocess theDependency
after instantiation.<I> void
setInitializer
(InitializerClaim<I, T> aInitializer) Sets theInitializerClaim
, being aClaim
dedicated to preprocess theDependency
after instantiation.void
setInstance
(T aInstance) Sets the instance for theDependency
(the type is derived from the instance if not already set, the alias is derived from type if not already set).void
setInstanceMetrics
(InstanceMetrics aInstanceMetrics) Sets theInstanceMetrics
instance for theInstanceMetrics
property.void
setInstanceMetrics
(InstanceMode aInstanceMode) Sets theInstanceMode
which describes how an instance for aDependency
is managed.void
setProfiles
(Object[] aProfiles) Sets the profiles for the profiles property.void
setProfiles
(Collection<?> aProfiles) Sets the profiles assigned to theDependencyBuilder
instance.void
Sets the tags for the tags property.void
setTags
(Collection<?> aTags) Sets the tags assigned to theDependencyBuilder
instance.void
withAddClaim
(Class<?> aType) Builder method for the accordingaddClaim(Class)
method.withAddClaim
(Class<?> aType, String aAlias) Builder method for the accordingaddClaim(Class, String)
method.withAddClaim
(String aAlias) Builder method for the accordingaddClaim(Claim)
method.withAddClaim
(Claim aClaim) Builder method for the accordingaddClaim(Claim)
method.withAddProfile
(Object aProfile) Builder method for adding a single profile.withAddTag
(Object aTag) Builder method for adding a single tag.withClaims
(Collection<Claim> aClaims) Builder method for thesetClaims(Claim[])
method.withClaims
(Claim... aClaims) <F extends org.refcodes.factory.Factory<T>>
DependencyBuilder<T>withFactory
(Class<F> aFactory) Builder method for thesetFactory(Class)
method.<F extends org.refcodes.factory.Factory<T>>
DependencyBuilder<T>withFactory
(Class<F> aFactory, String aAlias) Builder method for thesetFactory(Class, String)
method.<F> DependencyBuilder<T>
withFactory
(Class<F> aDependency, Function<F, T> aFactory) Builder method for thesetFactory(Class, Function)
method.<F> DependencyBuilder<T>
withFactory
(Class<F> aDependency, Function<F, T> aFactory, String aAlias) Builder method for thesetFactory(Class, Function, String)
method.<F> DependencyBuilder<T>
withFactory
(FactoryClaim<F, T> aFactory) Builder method for thesetFactory(FactoryClaim)
method.<F> DependencyBuilder<T>
withInitializer
(Class<F> aDependency, BiFunction<T, F, T> aInitializer, String aAlias) Builder method for thesetInitializer(Class, BiFunction, String)
method.<I extends org.refcodes.factory.Initializer<T>>
DependencyBuilder<T>withInitializer
(Class<I> aInitializer) Builder method for thesetInitializer(Class)
method.<I extends org.refcodes.factory.Initializer<T>>
DependencyBuilder<T>withInitializer
(Class<I> aInitializer, String aAlias) Builder method for thesetInitializer(Class, String)
method.<I> DependencyBuilder<T>
withInitializer
(Class<I> aDependency, BiFunction<T, I, T> aInitializer) Builder method for thesetInitializer(Class, BiFunction)
method.<I> DependencyBuilder<T>
withInitializer
(InitializerClaim<I, T> aInitializer) Builder method for thesetInitializer(InitializerClaim)
method.withInstance
(T aInstance) withInstanceMetrics
(InstanceMetrics aInstanceMetrics) Sets theInstanceMetrics
instance for theInstanceMetrics
property.withInstanceMetrics
(InstanceMode aInstanceMode) Builder method for thesetInstanceMetrics(InstanceMode)
method.withProfiles
(Object... aProfiles) Sets the profiles for the profiles property.withProfiles
(Collection<?> aProfiles) Builder method for thesetProfiles(Object[])
method.Sets the tags for the tags property.withTags
(Collection<?> aTags) Builder method for thesetTags(Object[])
method.Methods inherited from class org.refcodes.decoupling.Dependency
compareTo, equals, getAlias, getClaims, getFactory, getInstanceMetrics, getInstances, getProfiles, getSetup, getTags, getType, hashCode, hasInstance, hasInstances, hasProfile, toInstance, toInstance, toInstance, toPostProcessed, toSchema, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.refcodes.mixin.AliasAccessor
getAlias
Methods inherited from interface org.refcodes.mixin.AliasAccessor.AliasProperty
letAlias
Methods inherited from interface org.refcodes.decoupling.ClaimsAccessor
getClaims
Methods inherited from interface org.refcodes.decoupling.ClaimsAccessor.ClaimsProperty
letClaims
Methods inherited from interface org.refcodes.mixin.InstanceAccessor.InstanceProperty
letInstance
Methods inherited from interface org.refcodes.decoupling.InstanceMetricsAccessor
getInstanceMetrics
Methods inherited from interface org.refcodes.decoupling.InstanceMetricsAccessor.InstanceMetricsProperty
letInstanceMetrics
Methods inherited from interface org.refcodes.decoupling.ProfilesAccessor
getProfiles
Methods inherited from interface org.refcodes.decoupling.ProfilesAccessor.ProfilesProperty
letProfiles
Methods inherited from interface org.refcodes.decoupling.TagsAccessor
getTags
Methods inherited from interface org.refcodes.decoupling.TagsAccessor.TagsProperty
letTags
Methods inherited from interface org.refcodes.mixin.TypeAccessor
getType
Methods inherited from interface org.refcodes.mixin.TypeAccessor.TypeProperty
letType
-
Constructor Details
-
DependencyBuilder
protected DependencyBuilder()Empty constructor for creating an instance of theDependencyBuilder
in which to apply the builder methods to set the desired state. -
DependencyBuilder
-
DependencyBuilder
-
-
Method Details
-
getInstance
- Specified by:
getInstance
in interfaceorg.refcodes.mixin.InstanceAccessor<T>
-
addClaim
-
addClaim
-
addClaim
-
addClaim
-
addProfile
Adds the given profile to the profiles.- Parameters:
aProfile
- The profile to add.- Returns:
- True in case the profile was added, false in case the profile has already been added.
-
addTag
Adds the given tag to the tags.- Parameters:
aTag
- The tag to add.- Returns:
- True in case the tag was added, false in case the tag has already been added.
-
setInitializer
Sets theInitializerClaim
, being aClaim
dedicated to preprocess theDependency
after instantiation.- Type Parameters:
I
- The type of theDependency
being claimed by theInitializerClaim
.- Parameters:
aInitializer
- The setup configuring thisDependency
's instances.
-
setInitializer
Sets theInitializerClaim
, being aClaim
dedicated to preprocess theDependency
after instantiation.- Type Parameters:
I
- The type of theDependency
being required by theInitializerClaim
.- Parameters:
aDependency
- The according claim required by theInitializerClaim
.aInitializer
- The setup configuring thisDependency
's instances.
-
setInitializer
Sets theInitializerClaim
, being aClaim
dedicated to preprocess theDependency
after instantiation.- Type Parameters:
I
- The type of theDependency
being claimed by theInitializerClaim
.- Parameters:
aDependency
- The according claim required by theInitializerClaim
.aInitializer
- The setup configuring thisDependency
's instances.aAlias
- the alias for theInitializerClaim
to be added.
-
setInitializer
Sets theInitializerClaim
, being aClaim
dedicated to preprocess theDependency
after instantiation. The accordingInitializerClaim
must implement theInitializer
functional interface for setting up thisDependency
's instances.- Type Parameters:
F
- The type of theDependency
being claimed by theInitializerClaim
.- Parameters:
aFactory
- The factory setting up thisDependency
's instance.
-
setInitializer
public <F extends org.refcodes.factory.Initializer<T>> void setInitializer(Class<F> aFactory, String aAlias) Sets theInitializerClaim
, being aClaim
dedicated to preprocess theDependency
after instantiation. The accordingInitializerClaim
must implement theInitializer
functional interface for setting up thisDependency
's instances.- Type Parameters:
F
- The type of theDependency
being claimed by theInitializerClaim
.- Parameters:
aFactory
- The factory setting up thisDependency
's instance.aAlias
- the alias for theInitializerClaim
to be added.
-
setFactory
- Type Parameters:
F
- The type of theDependency
being claimed by theFactoryClaim
.- Parameters:
aFactory
- TheFactoryClaim
instance used to create (fabricate) theDependency
's instance.
-
setFactory
- Type Parameters:
F
- The type of theDependency
being claimed by theFactoryClaim
.- Parameters:
aDependency
- The according claim required by theFactoryClaim
.aFactory
- The factory used to create (fabricate) theDependency
's instance.
-
setFactory
- Type Parameters:
F
- The type of theDependency
being claimed by theFactoryClaim
.- Parameters:
aDependency
- The according claim required by theFactoryClaim
.aFactory
- The factory setting up thisDependency
's instance.aAlias
- the alias for theFactoryClaim
to be added.
-
setFactory
- Type Parameters:
F
- The type of theDependency
being claimed by theFactoryClaim
.- Parameters:
aFactory
- The factory setting up thisDependency
's instance.
-
setFactory
public <F extends org.refcodes.factory.Factory<T>> void setFactory(Class<F> aFactory, String aAlias) - Type Parameters:
F
- The type of theDependency
being claimed by theFactoryClaim
.- Parameters:
aFactory
- The factory setting up thisDependency
's instance.aAlias
- the alias for theFactoryClaim
to be added.
-
setAlias
- Specified by:
setAlias
in interfaceorg.refcodes.mixin.AliasAccessor.AliasMutator
-
setInstance
Sets the instance for theDependency
(the type is derived from the instance if not already set, the alias is derived from type if not already set).- Specified by:
setInstance
in interfaceorg.refcodes.mixin.InstanceAccessor.InstanceMutator<T>
- Overrides:
setInstance
in classDependency<T>
- Parameters:
aInstance
- The instance of the dependency;
-
setInstanceMetrics
Sets theInstanceMetrics
instance for theInstanceMetrics
property.- Specified by:
setInstanceMetrics
in interfaceInstanceMetricsAccessor.InstanceMetricsMutator
- Parameters:
aInstanceMetrics
- TheInstanceMetrics
instance to be stored by theInstanceMetrics
property.
-
setInstanceMetrics
Sets theInstanceMode
which describes how an instance for aDependency
is managed.- Parameters:
aInstanceMode
- The accordingInstanceMode
.
-
setProfiles
Sets the profiles for the profiles property.- Specified by:
setProfiles
in interfaceProfilesAccessor.ProfilesMutator
- Parameters:
aProfiles
- The profiles to be stored by the profiles property.
-
setProfiles
Sets the profiles assigned to theDependencyBuilder
instance.- Parameters:
aProfiles
- The profiles to be assigned.
-
setTags
Sets the tags for the tags property.- Specified by:
setTags
in interfaceTagsAccessor.TagsMutator
- Parameters:
aTags
- The tags to be stored by the tags property.
-
setTags
Sets the tags assigned to theDependencyBuilder
instance.- Parameters:
aTags
- The tags to be assigned.
-
setClaims
- Specified by:
setClaims
in interfaceClaimsAccessor.ClaimsMutator
- Parameters:
aClaims
- TheClaim
instances to be stored by theClaim
instances property.
-
setClaims
Sets theClaim
instances to theDependencyBuilder
instance.- Parameters:
aClaims
- TheClaim
instances to be assigned.
-
setType
- Specified by:
setType
in interfaceorg.refcodes.mixin.TypeAccessor.TypeMutator<T>
-
withAddClaim
Builder method for the accordingaddClaim(Claim)
method. -
withAddClaim
Builder method for the accordingaddClaim(Claim)
method. -
withAddClaim
Builder method for the accordingaddClaim(Class)
method.- Parameters:
aType
- the type of the claimed dependency.- Returns:
- This instance as of the builder pattern with additions to finish
building the current
Claim
.
-
withAddClaim
Builder method for the accordingaddClaim(Class, String)
method. -
withAddProfile
Builder method for adding a single profile.- Parameters:
aProfile
- The profile to be added.- Returns:
- This instance as of the builder pattern.
-
withAddTag
Builder method for adding a single tag.- Parameters:
aTag
- The tag to be added.- Returns:
- This instance as of the builder pattern.
-
withAlias
- Specified by:
withAlias
in interfaceorg.refcodes.mixin.AliasAccessor.AliasBuilder<T>
-
withInstance
- Specified by:
withInstance
in interfaceorg.refcodes.mixin.InstanceAccessor.InstanceBuilder<T,
DependencyBuilder<T>>
-
withInstanceMetrics
Sets theInstanceMetrics
instance for theInstanceMetrics
property.- Specified by:
withInstanceMetrics
in interfaceInstanceMetricsAccessor.InstanceMetricsBuilder<T>
- Parameters:
aInstanceMetrics
- TheInstanceMetrics
instance to be stored by theInstanceMetrics
property.- Returns:
- The builder for applying multiple build operations.
-
withInstanceMetrics
Builder method for thesetInstanceMetrics(InstanceMode)
method.- Parameters:
aInstanceMode
- The accordingInstanceMode
.- Returns:
- This instance as of the builder pattern.
-
withProfiles
Builder method for thesetProfiles(Object[])
method.- Parameters:
aProfiles
- The profiles to be assigned.- Returns:
- This instance as of the builder pattern.
-
withProfiles
Sets the profiles for the profiles property.- Specified by:
withProfiles
in interfaceProfilesAccessor.ProfilesBuilder<T>
- Parameters:
aProfiles
- The profiles to be stored by the profiles property.- Returns:
- The builder for applying multiple build operations.
-
withTags
Builder method for thesetTags(Object[])
method.- Parameters:
aTags
- The tags to be assigned.- Returns:
- This instance as of the builder pattern.
-
withTags
Sets the tags for the tags property.- Specified by:
withTags
in interfaceTagsAccessor.TagsBuilder<T>
- Parameters:
aTags
- The tags to be stored by the tags property.- Returns:
- The builder for applying multiple build operations.
-
withClaims
Builder method for thesetClaims(Claim[])
method.- Parameters:
aClaims
- TheClaim
instances to be assigned.- Returns:
- This instance as of the builder pattern.
-
withClaims
- Specified by:
withClaims
in interfaceClaimsAccessor.ClaimsBuilder<T>
- Parameters:
aClaims
- TheClaim
instances to be stored by theClaim
instances property.- Returns:
- The builder for applying multiple build operations.
-
withType
- Specified by:
withType
in interfaceorg.refcodes.mixin.TypeAccessor.TypeBuilder<T,
DependencyBuilder<T>>
-
withInitializer
Builder method for thesetInitializer(InitializerClaim)
method.- Type Parameters:
I
- The type of theDependency
being claimed by theInitializerClaim
.- Parameters:
aInitializer
- The setup configuring thisDependency
's instances.- Returns:
- This instance as of the builder pattern.
-
withInitializer
public <I> DependencyBuilder<T> withInitializer(Class<I> aDependency, BiFunction<T, I, T> aInitializer) Builder method for thesetInitializer(Class, BiFunction)
method.- Type Parameters:
I
- The type of theDependency
being claimed by theInitializerClaim
.- Parameters:
aDependency
- The according dependency required by theInitializerClaim
.aInitializer
- The setup configuring thisDependency
's instances.- Returns:
- This instance as of the builder pattern.
-
withInitializer
public <F> DependencyBuilder<T> withInitializer(Class<F> aDependency, BiFunction<T, F, T> aInitializer, String aAlias) Builder method for thesetInitializer(Class, BiFunction, String)
method.- Type Parameters:
F
- The type of theDependency
being claimed by theInitializerClaim
.- Parameters:
aDependency
- The according claim required by theInitializerClaim
.aInitializer
- The setup configuring thisDependency
's instances.aAlias
- the alias for theInitializerClaim
to be added.- Returns:
- This instance as of the builder pattern.
-
withInitializer
public <I extends org.refcodes.factory.Initializer<T>> DependencyBuilder<T> withInitializer(Class<I> aInitializer) Builder method for thesetInitializer(Class)
method.- Type Parameters:
I
- The type of theDependency
being claimed by theInitializerClaim
.- Parameters:
aInitializer
- The setup configuring thisDependency
's instances.- Returns:
- This instance as of the builder pattern.
-
withInitializer
public <I extends org.refcodes.factory.Initializer<T>> DependencyBuilder<T> withInitializer(Class<I> aInitializer, String aAlias) Builder method for thesetInitializer(Class, String)
method.- Type Parameters:
I
- The type of theDependency
being claimed by theInitializerClaim
.- Parameters:
aInitializer
- The setup configuring thisDependency
's instances.aAlias
- the alias for theInitializerClaim
to be added.- Returns:
- This instance as of the builder pattern.
-
withFactory
Builder method for thesetFactory(FactoryClaim)
method.- Type Parameters:
F
- The type of theDependency
being required by theFactoryClaim
.- Parameters:
aFactory
- TheFactoryClaim
instance used for setting up theDependency
.- Returns:
- This instance as of the builder pattern.
-
withFactory
Builder method for thesetFactory(Class, Function)
method.- Type Parameters:
F
- The type of theDependency
being claimed by theFactoryClaim
.- Parameters:
aDependency
- The according dependency required by theFactoryClaim
.aFactory
- The factory fabricating (creating) thisDependency
's instances using the provided dependency.- Returns:
- This instance as of the builder pattern.
-
withFactory
public <F> DependencyBuilder<T> withFactory(Class<F> aDependency, Function<F, T> aFactory, String aAlias) Builder method for thesetFactory(Class, Function, String)
method.- Type Parameters:
F
- The type of theDependency
being claimed by theFactoryClaim
.- Parameters:
aDependency
- The according dependency required by theFactoryClaim
.aFactory
- The factory fabricating (creating) thisDependency
's instances using the provided dependency.aAlias
- the alias for theFactoryClaim
to be added.- Returns:
- This instance as of the builder pattern.
-
withFactory
public <F extends org.refcodes.factory.Factory<T>> DependencyBuilder<T> withFactory(Class<F> aFactory) Builder method for thesetFactory(Class)
method.- Type Parameters:
F
- The type of theDependency
being claimed by theFactoryClaim
.- Parameters:
aFactory
- The factory setting up thisDependency
's instance.- Returns:
- This instance as of the builder pattern.
-
withFactory
public <F extends org.refcodes.factory.Factory<T>> DependencyBuilder<T> withFactory(Class<F> aFactory, String aAlias) Builder method for thesetFactory(Class, String)
method.- Type Parameters:
F
- The type of theDependency
being claimed by theFactoryClaim
.- Parameters:
aFactory
- The factory setting up thisDependency
's instance.aAlias
- the alias for theFactoryClaim
to be added.- Returns:
- This instance as of the builder pattern.
-