java.lang.Object
org.refcodes.decoupling.Claim
org.refcodes.decoupling.FactoryClaim<C,T>
- Type Parameters:
C
- The type of theDependency
claimed for fabricating instances of the given type.T
- The type of the instance to be created.
- All Implemented Interfaces:
Comparable<Claim>
,org.refcodes.factory.ContextTypeFactory<T,
,C> org.refcodes.mixin.AliasAccessor
,org.refcodes.mixin.Schemable
,org.refcodes.mixin.TypeAccessor
public class FactoryClaim<C,T>
extends Claim
implements org.refcodes.factory.ContextTypeFactory<T,C>
A
FactoryClaim
extends a Claim
and uses a Function
upon a Dependency
to create (fabricate) an 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionFabricates (creates) the provided instance.getType()
Returns the type of theDependency
required by thisFactoryClaim
instance when invokingcreate(Object)
.toSchema()
Methods inherited from class org.refcodes.decoupling.Claim
compareTo, equals, getAlias, hashCode, isClaim, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.refcodes.factory.ContextTypeFactory
create
-
Constructor Details
-
FactoryClaim
Creates a newFactoryClaim
.- Parameters:
aType
- The type of theDependency
required by theFactoryClaim
.aFactory
- The processor to be used by theFactoryClaim
instance.
-
FactoryClaim
Creates a newFactoryClaim
.- Parameters:
aType
- The type of theDependency
required by theFactoryClaim
.aFactory
- The processor to be used by theFactoryClaim
instance.aAlias
- The alias for theFactoryClaim
.
-
-
Method Details
-
create
Fabricates (creates) the provided instance.- Specified by:
create
in interfaceorg.refcodes.factory.ContextTypeFactory<C,
T> - Parameters:
aClaim
- TheDependency
declaration required for fabrication.- Returns:
- The fabricated instance.
-
getType
Returns the type of theDependency
required by thisFactoryClaim
instance when invokingcreate(Object)
. -
toSchema
-