[forge-issues] [JBoss JIRA] (ROASTER-4) Having Parameterize interface bit more typed
Lincoln Baxter III (JIRA)
issues at jboss.org
Tue Apr 29 11:18:35 EDT 2014
[ https://issues.jboss.org/browse/ROASTER-4?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12964459#comment-12964459 ]
Lincoln Baxter III commented on ROASTER-4:
------------------------------------------
+1
I like this idea. It's good.
> Having Parameterize interface bit more typed
> --------------------------------------------
>
> Key: ROASTER-4
> URL: https://issues.jboss.org/browse/ROASTER-4
> Project: Roaster
> Issue Type: Feature Request
> Components: API
> Affects Versions: 2.1.0.Final
> Reporter: Antonio Goncalves
> Fix For: 2.x Future
>
>
> For a constraint, I need to implement a parametrize interface like this :
> {code}
> public class MaxValidatorForString implements ConstraintValidator<Max, Number> {
> {code}
> The only way I could find is by passing a String :
> {code}
> final JavaClassSource javaClass = Roaster.create(JavaClassSource.class);
> javaClass.setName("MaxValidatorForString");
> javaClass.addImport(ConstraintValidator.class);
> javaClass.addInterface("ConstraintValidator<Max, Number>");
> {code}
> It's a shame because with {{addInterface(Class)}}, it does the import automatically and things are more typed. But I cannot add types :
> {code}
> final JavaClassSource javaClass = Roaster.create(JavaClassSource.class);
> javaClass.setName("MaxValidatorForString");
> javaClass.addInterface(ConstraintValidator.class);
> {code}
> It would be good to have something like :
> {code}
> javaClass.addInterface(ConstraintValidator.class).addType(Max.class).addType(Number.class);
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the forge-issues
mailing list