[jboss-jira] [JBoss JIRA] (LOGTOOL-56) Introduce parameter positions and "repeat" annotations
James Perkins (JIRA)
jira-events at lists.jboss.org
Wed Nov 14 14:15:23 EST 2012
[ https://issues.jboss.org/browse/LOGTOOL-56?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12734316#comment-12734316 ]
James Perkins commented on LOGTOOL-56:
--------------------------------------
Pull request sent https://github.com/jboss-logging/jboss-logging-tools/pull/7
> Introduce parameter positions and "repeat" annotations
> ------------------------------------------------------
>
> Key: LOGTOOL-56
> URL: https://issues.jboss.org/browse/LOGTOOL-56
> Project: Log Tool
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Reporter: David Lloyd
> Assignee: David Lloyd
> Priority: Optional
>
> Introduce a {{@Pos({n, n, n})}} annotation that allows repeating and positional adjustment of a parameter This would allow for things like this:
> {code}
> @LogMessage(level = DEBUG)
> @Message(value = "Got a %d (%x)")
> void gotNumber(@Pos({1, 2}) int value);
> {code}
> Unqualified parameters start counting from the position of the previous parameter. If two parameters end up in the same position it's an error; if a position has no parameter that's an error as well.
> Positional parameters should allow for multiple transformations too:
> {code}
> @LogMessage(level = DEBUG)
> @Message(value = "Got a %s with a type of %s which has a hash code of %x")
> void gotThing(@Pos(value = {1, 2, 3}, transform = {{}, {GET_CLASS}, {GET_CLASS, HASH_CODE}) Object thing);
> {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 jboss-jira
mailing list