Interface DependencyBuilder<T>

Type Parameters:
T - the generic type of the Dependency.
All Superinterfaces:
org.refcodes.mixin.AliasAccessor, org.refcodes.mixin.AliasAccessor.AliasBuilder<DependencyBuilder<T>>, org.refcodes.mixin.AliasAccessor.AliasMutator, org.refcodes.mixin.AliasAccessor.AliasProperty, ClaimsAccessor, ClaimsAccessor.ClaimsBuilder<DependencyBuilder<T>>, ClaimsAccessor.ClaimsMutator, ClaimsAccessor.ClaimsProperty, Comparable<Dependency<T>>, Dependency<T>, 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>, InstanceMetricsAccessor, InstanceMetricsAccessor.InstanceMetricsBuilder<DependencyBuilder<T>>, InstanceMetricsAccessor.InstanceMetricsMutator, InstanceMetricsAccessor.InstanceMetricsProperty, ProfilesAccessor, ProfilesAccessor.ProfilesBuilder<DependencyBuilder<T>>, ProfilesAccessor.ProfilesMutator, ProfilesAccessor.ProfilesProperty, org.refcodes.mixin.Schemable, TagsAccessor, TagsAccessor.TagsBuilder<DependencyBuilder<T>>, TagsAccessor.TagsMutator, TagsAccessor.TagsProperty, 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>
All Known Implementing Classes:
DependencyBuilderImpl

public interface DependencyBuilder<T> extends Dependency<T>, 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.
  • Method Details

    • addClaim

      boolean addClaim(Claim aClaim)
      Adds the given Claim to the Claim instances.
      Parameters:
      aClaim - the claim to be added.
      Returns:
      True in case the Claim was added, false in case the Claim has already been added.
    • addClaim

      boolean addClaim(Class<?> aType)
      Adds Claim for the given type to the Claim instances.
      Parameters:
      aType - the type of the claimed dependency.
      Returns:
      True in case the Claim was added, false in case the Claim has already been added.
    • addClaim

      boolean addClaim(String aAlias)
      Adds Claim for the given type and with the given alias to the Claim instances.
      Parameters:
      aAlias - The alias for the given Claim.
      Returns:
      True in case the Claim was added, false in case the Claim has already been added.
    • addClaim

      boolean addClaim(Class<?> aType, String aAlias)
      Adds Claim for the given type and with the given alias to the Claim instances.
      Parameters:
      aType - the type of the claimed dependency.
      aAlias - The alias for the given Claim.
      Returns:
      True in case the Claim was added, false in case the Claim has already been added.
    • addProfile

      boolean addProfile(Object aProfile)
      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

      boolean addTag(Object aTag)
      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.
    • setInstanceMetrics

      void setInstanceMetrics(InstanceMode aInstanceMode)
      Sets the InstanceMode which describes how an instance for a Dependency is managed.
      Parameters:
      aInstanceMode - The according InstanceMode.
    • setProfiles

      void setProfiles(Collection<?> aProfiles)
      Sets the profiles assigned to the DependencyBuilder instance.
      Parameters:
      aProfiles - The profiles to be assigned.
    • setTags

      void setTags(Collection<?> aTags)
      Sets the tags assigned to the DependencyBuilder instance.
      Parameters:
      aTags - The tags to be assigned.
    • setSetup

      <D> void setSetup(Setup<D,T> aSetup)
      Sets the Setup, being a Claim dedicated to preprocess the Dependency after instantiation.
      Type Parameters:
      D - The type of the Dependency being required by the Setup.
      Parameters:
      aSetup - The Setup instance used for setting up the Dependency.
    • setSetup

      <D> void setSetup(Class<D> aDependency, BiFunction<T,D,T> aInitializer)
      Sets the Setup, being a Claim dedicated to preprocess the Dependency after instantiation.
      Type Parameters:
      D - The type of the Dependency being required by the Setup.
      Parameters:
      aDependency - The according claim required by the Setup.
      aInitializer - The factory setting up this Dependency's instance by a claim's Dependency.
    • setSetup

      <D> void setSetup(Class<D> aDependency, BiFunction<T,D,T> aInitializer, String aAlias)
      Sets the Setup, being a Claim dedicated to preprocess the Dependency after instantiation.
      Type Parameters:
      D - The type of the Dependency being required by the Setup.
      Parameters:
      aDependency - The according claim required by the Setup.
      aInitializer - The factory setting up this Dependency's instance by a claim's Dependency.
      aAlias - the alias for the Setup to be added.
    • setFactory

      <D> void setFactory(Factory<D,T> aFactory)
      Sets the Factory, being a Claim dedicated to fabricate (create) the Dependency's instance.
      Type Parameters:
      D - The type of the Dependency being required by the Factory.
      Parameters:
      aFactory - The Factory instance used to create (fabricate) the Dependency's instance.
    • setFactory

      <D> void setFactory(Class<D> aDependency, Function<D,T> aFactory)
      Sets the Factory, being a Claim dedicated to fabricate (create) the Dependency's instance.
      Type Parameters:
      D - The type of the Dependency being required by the Factory.
      Parameters:
      aDependency - The according claim required by the Factory.
      aFactory - The factory used to create (fabricate) the Dependency's instance.
    • setFactory

      <D> void setFactory(Class<D> aDependency, Function<D,T> aFactory, String aAlias)
      Sets the Factory, being a Claim dedicated to fabricate (create) the Dependency's instance.
      Type Parameters:
      D - The type of the Dependency being required by the Factory.
      Parameters:
      aDependency - The according claim required by the Factory.
      aFactory - The factory setting up this Dependency's instance.
      aAlias - the alias for the Factory to be added.
    • setClaims

      void setClaims(Collection<Claim> aClaims)
      Sets the Claim instances to the DependencyBuilder instance.
      Parameters:
      aClaims - The Claim instances to be assigned.
    • withAddProfile

      DependencyBuilder<T> withAddProfile(Object aProfile)
      Builder method for adding a single profile.
      Parameters:
      aProfile - The profile to be added.
      Returns:
      This instance as of the builder pattern.
    • withAddTag

      DependencyBuilder<T> withAddTag(Object aTag)
      Builder method for adding a single tag.
      Parameters:
      aTag - The tag to be added.
      Returns:
      This instance as of the builder pattern.
    • withAddClaim

      DependencyBuilder<T> withAddClaim(Claim aClaim)
      Builder method for the according addClaim(Claim) method.
      Parameters:
      aClaim - the Claim to be added.
      Returns:
      This instance as of the builder pattern with additions to finish building the current Claim.
    • withAddClaim

      DependencyBuilder<T> withAddClaim(String aAlias)
      Builder method for the according addClaim(Claim) method.
      Parameters:
      aAlias - the alias for the Claim to be added.
      Returns:
      This instance as of the builder pattern with additions to finish building the current Claim.
    • withAddClaim

      DependencyBuilder<T> withAddClaim(Class<?> aType)
      Builder method for the according addClaim(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

      DependencyBuilder<T> withAddClaim(Class<?> aType, String aAlias)
      Builder method for the according addClaim(Class, String) method.
      Parameters:
      aType - the type of the claimed dependency.
      aAlias - The alias of the given Claim.
      Returns:
      This instance as of the builder pattern with additions to finish building the current Claim.
    • withInstanceMetrics

      DependencyBuilder<T> withInstanceMetrics(InstanceMode aInstanceMode)
      Builder method for the setInstanceMetrics(InstanceMode) method.
      Parameters:
      aInstanceMode - The according InstanceMode.
      Returns:
      This instance as of the builder pattern.
    • withProfiles

      DependencyBuilder<T> withProfiles(Collection<?> aProfiles)
      Parameters:
      aProfiles - The profiles to be assigned.
      Returns:
      This instance as of the builder pattern.
    • withTags

      DependencyBuilder<T> withTags(Collection<?> aTags)
      Builder method for the TagsAccessor.TagsMutator.setTags(Object[]) method.
      Parameters:
      aTags - The tags to be assigned.
      Returns:
      This instance as of the builder pattern.
    • withClaims

      DependencyBuilder<T> withClaims(Collection<Claim> aClaims)
      Parameters:
      aClaims - The Claim instances to be assigned.
      Returns:
      This instance as of the builder pattern.
    • withSetup

      <D> DependencyBuilder<T> withSetup(Setup<D,T> aSetup)
      Builder method for the setSetup(Setup) method.
      Type Parameters:
      D - The type of the Dependency being required by the Setup.
      Parameters:
      aSetup - The Setup instance used for setting up the Dependency.
      Returns:
      This instance as of the builder pattern.
    • withSetup

      <D> DependencyBuilder<T> withSetup(Class<D> aDependency, BiFunction<T,D,T> aInitializer)
      Builder method for the setSetup(Class, BiFunction) method.
      Type Parameters:
      D - The type of the Dependency being required by the Setup.
      Parameters:
      aDependency - The according dependency required by the Setup.
      aInitializer - The factory setting up this Dependency's instance using the provided dependency.
      Returns:
      This instance as of the builder pattern.
    • withSetup

      <D> DependencyBuilder<T> withSetup(Class<D> aDependency, BiFunction<T,D,T> aInitializer, String aAlias)
      Builder method for the setSetup(Class, BiFunction, String) method.
      Type Parameters:
      D - The type of the Dependency being required by the Setup.
      Parameters:
      aDependency - The according claim required by the Setup.
      aInitializer - The factory setting up this Dependency's instance using the provided dependency.
      aAlias - the alias for the Setup to be added.
      Returns:
      This instance as of the builder pattern.
    • withFactory

      <D> DependencyBuilder<T> withFactory(Factory<D,T> aFactory)
      Builder method for the setFactory(Factory) method.
      Type Parameters:
      D - The type of the Dependency being required by the Factory.
      Parameters:
      aFactory - The Factory instance used for setting up the Dependency.
      Returns:
      This instance as of the builder pattern.
    • withFactory

      <D> DependencyBuilder<T> withFactory(Class<D> aDependency, Function<D,T> aFactory)
      Builder method for the setFactory(Class, Function) method.
      Type Parameters:
      D - The type of the Dependency being required by the Factory.
      Parameters:
      aDependency - The according dependency required by the Factory.
      aFactory - The factory fabricating (creating) this Dependency's instances using the provided dependency.
      Returns:
      This instance as of the builder pattern.
    • withFactory

      <D> DependencyBuilder<T> withFactory(Class<D> aDependency, Function<D,T> aFactory, String aAlias)
      Builder method for the setFactory(Class, Function, String) method.
      Type Parameters:
      D - The type of the Dependency being required by the Factory.
      Parameters:
      aDependency - The according dependency required by the Factory.
      aFactory - The factory fabricating (creating) this Dependency's instances using the provided dependency.
      aAlias - the alias for the Factory to be added.
      Returns:
      This instance as of the builder pattern.