Niclas Hedhman created ZEST-179:
-----------------------------------
Summary: Mechanism to declare Defaults factories
Key: ZEST-179
URL: https://issues.apache.org/jira/browse/ZEST-179
Project: Zest
Issue Type: New Feature
Reporter: Niclas Hedhman
Priority: Minor
Currently, it is possible to declare a default value for properties during
assembly.
{{code}}
module.forMixin( Abc.class ).declareDefaults().someProperty().set( 123 );
{{code}}
But there is no way to do this for Property declarations that take
ValueComposites as their type, since the Runtime has not be activated yet.
But if it was possible to declare a factory,
{{code}}
module.forMixin( Abc.class ).declareDefaultsFactory(MyFactory.class, 123,
"habba");
{{code}}
The optional arguments are Uses declarations and the MyFactory is either an
Object or a TransientComposite, both capable of Uses injections.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)