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] [Created] (ZEST-179) Mechanism to declare Defaults factories
Date Sat, 22 Oct 2016 03:49:58 GMT
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.
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

View raw message