Class FactoryClaim<C,T>
java.lang.Object
org.refcodes.decoupling.Claim
org.refcodes.decoupling.FactoryClaim<C,T>
- Type Parameters:
C- The type of theDependencyclaimed 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.TypeAccessor, org.refcodes.schema.Schemable
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>, org.refcodes.mixin.AliasAccessor.AliasMutator, org.refcodes.mixin.AliasAccessor.AliasPropertyNested classes/interfaces inherited from interface org.refcodes.mixin.TypeAccessor
org.refcodes.mixin.TypeAccessor.TypeBuilder<T,B>, org.refcodes.mixin.TypeAccessor.TypeMutator<T>, org.refcodes.mixin.TypeAccessor.TypeProperty<T> -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionFabricates (creates) the provided instance.getType()Returns the type of theDependencyrequired by thisFactoryClaiminstance when invokingcreate(Object).toSchema()Methods inherited from interface org.refcodes.factory.ContextTypeFactory
create
-
Constructor Details
-
FactoryClaim
Creates a newFactoryClaim.- Parameters:
aType- The type of theDependencyrequired by theFactoryClaim.aFactory- The processor to be used by theFactoryClaiminstance.
-
FactoryClaim
Creates a newFactoryClaim.- Parameters:
aType- The type of theDependencyrequired by theFactoryClaim.aFactory- The processor to be used by theFactoryClaiminstance.aAlias- The alias for theFactoryClaim.
-
-
Method Details
-
create
Fabricates (creates) the provided instance.- Specified by:
createin interfaceorg.refcodes.factory.ContextTypeFactory<C,T> - Parameters:
aClaim- TheDependencydeclaration required for fabrication.- Returns:
- The fabricated instance.
-
getType
Returns the type of theDependencyrequired by thisFactoryClaiminstance when invokingcreate(Object). -
toSchema
-