You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@polygene.apache.org by "Niclas Hedhman (JIRA)" <ji...@apache.org> on 2016/10/22 03:49:58 UTC
[jira] [Created] (ZEST-179) Mechanism to declare Defaults factories
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)