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/04/15 11:39:25 UTC
[jira] [Commented] (ZEST-141) UseDefaults annotation with value
[ https://issues.apache.org/jira/browse/ZEST-141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15242702#comment-15242702 ]
Niclas Hedhman commented on ZEST-141:
-------------------------------------
Since the "value" field in the @UseDefaults annotation type must be a fixed type, we need to make it java.lang.String and do conversions when possible.
So the example will be
{code}
public interface ABC {
@UseDefaults("127.0.0.1")
Property<String> hostname();
@UseDefaults("8080")
Property<Integer> port();
}
{code}
> UseDefaults annotation with value
> ---------------------------------
>
> Key: ZEST-141
> URL: https://issues.apache.org/jira/browse/ZEST-141
> Project: Zest
> Issue Type: Improvement
> Affects Versions: 2.1
> Reporter: Mingzhou Zhuang
> Priority: Minor
> Labels: features
>
> Define default value where I declare the Property, such as:
> {code}
> public interface ABC {
> @UseDefaults(value="127.0.0.1")
> Property<String> hostname();
> @UseDefaults(value=8080)
> Property<Integer> port();
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)