David Lloyd created LOGTOOL-56:
----------------------------------
Summary: 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