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>, ContextTypeFactory<T,C>, AliasAccessor, TypeAccessor, Diagnosable, Schemable<DiagnosticOptions>
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 AliasAccessor
AliasAccessor.AliasBuilder<B>, AliasAccessor.AliasMutator, AliasAccessor.AliasPropertyNested classes/interfaces inherited from interface ContextTypeFactory
ContextTypeFactory.ConfigurableContextTypeFactory<T,CTX, OPTS> Nested classes/interfaces inherited from interface TypeAccessor
TypeAccessor.TypeBuilder<T,B>, TypeAccessor.TypeMutator<T>, TypeAccessor.TypeProperty<T> -
Field Summary
FieldsFields inherited from class Claim
_alias, _type, CLAIM_STEREOTYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionFabricates (creates) the provided instance.getType()Returns the type of theDependencyrequired by thisFactoryClaiminstance when invokingcreate(Object).toSchema()
-
Field Details
-
FACTORY_STEREOTYPE
- See Also:
-
-
Constructor Details
-
FactoryClaim
Instantiates the classFactoryClaim.- Parameters:
aFactory- The processor to be used by theFactoryClaiminstance.- See Also:
-
FactoryClaim
Instantiates the classFactoryClaim.- Parameters:
aFactory- The processor to be used by theFactoryClaiminstance.- See Also:
-
-
Method Details
-
create
Fabricates (creates) the provided instance.- Specified by:
createin interfaceContextTypeFactory<C,T> - Parameters:
aClaim- TheDependencydeclaration required for fabrication.- Returns:
- The fabricated instance.
-
getType
Returns the type of theDependencyrequired by thisFactoryClaiminstance when invokingcreate(Object).- Specified by:
getTypein interfaceTypeAccessor<C>- Overrides:
getTypein classClaim- Returns:
- The according type.
-
toSchema
-