You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2016/04/14 21:31:25 UTC

[jira] [Created] (WICKET-6142) Make use of ElementType.TYPE_USE for annotations where appropriate

Martin Grigorov created WICKET-6142:
---------------------------------------

             Summary: Make use of ElementType.TYPE_USE for annotations where appropriate
                 Key: WICKET-6142
                 URL: https://issues.apache.org/jira/browse/WICKET-6142
             Project: Wicket
          Issue Type: Improvement
          Components: wicket
    Affects Versions: 8.0.0-M1
            Reporter: Martin Grigorov


With Java 8 it is possible to annotate types at the use site if the annotation has @Target({ElementType.TYPE_USE}).

It would be nice to do something like:

{code}
...
@AuthorizeAction(action=Component.RENDER, roles={ONE, TWO})
Link link = new Link(id) {...};
add(sc);
{code}

In Wicket 7 (Java 7) one has to create a custom Link to be able to annotate it.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)