polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niclas Hedhman (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (ZEST-179) Mechanism to declare Defaults factories
Date Sat, 22 Oct 2016 03:50:58 GMT

     [ https://issues.apache.org/jira/browse/ZEST-179?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Niclas Hedhman updated ZEST-179:
--------------------------------
    Description: 
Currently, it is possible to declare a default value for properties during assembly.
{{
module.forMixin( Abc.class ).declareDefaults().someProperty().set( 123 );
}}
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,

{{
module.forMixin( Abc.class ).declareDefaultsFactory(MyFactory.class, 123, "habba");
}}

The optional arguments are Uses declarations and the MyFactory is either an Object or a TransientComposite,
both capable of Uses injections.




  was:
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.





> 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.
> {{
> module.forMixin( Abc.class ).declareDefaults().someProperty().set( 123 );
> }}
> 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,
> {{
> module.forMixin( Abc.class ).declareDefaultsFactory(MyFactory.class, 123, "habba");
> }}
> 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)

Mime
View raw message