java.lang.Object
org.refcodes.decoupling.Claim
org.refcodes.decoupling.InitializerClaim<C,T>
- Type Parameters:
C
- The type of theDependency
claimed for setting up an instance of the given type.T
- The type of the instance to be initialize.
- All Implemented Interfaces:
Comparable<Claim>
,org.refcodes.mixin.AliasAccessor
,org.refcodes.mixin.Schemable
,org.refcodes.mixin.TypeAccessor
A
InitializerClaim
extends a Claim
and uses a
BiFunction
upon a Dependency
to initialize a given instance.-
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.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
-
Constructor Summary
ConstructorDescriptionInitializerClaim
(Class<C> aType, BiFunction<T, C, T> aInitializer) Creates a newInitializerClaim
.InitializerClaim
(Class<C> aType, BiFunction<T, C, T> aInitializer, String aAlias) Creates a newInitializerClaim
. -
Method Summary
Modifier and TypeMethodDescriptiongetType()
Returns the type of theDependency
required by thisInitializerClaim
instance when invokinginitialize(Object, Object)
.initialize
(C aClaim, T aInstance) Initializes the provided instance.toSchema()
-
Constructor Details
-
InitializerClaim
Creates a newInitializerClaim
.- Parameters:
aType
- The type of theDependency
required by theInitializerClaim
.aInitializer
- The processor to be used by theInitializerClaim
instance.
-
InitializerClaim
Creates a newInitializerClaim
.- Parameters:
aType
- The type of theDependency
required by theInitializerClaim
.aInitializer
- The processor to be used by theInitializerClaim
instance.aAlias
- The alias for theInitializerClaim
.
-
-
Method Details
-
initialize
Initializes the provided instance.- Parameters:
aClaim
- TheDependency
declaration required for initialization.aInstance
- The instance to be initialized.- Returns:
- The initialized instance.
-
getType
Returns the type of theDependency
required by thisInitializerClaim
instance when invokinginitialize(Object, Object)
. -
toSchema
-