]
David Lloyd commented on LOGTOOL-91:
------------------------------------
Yeah looks good. I'd probably default to 0 rather than MIN_VALUE though.
Add ability to provide constant values for properties
-----------------------------------------------------
Key: LOGTOOL-91
URL:
https://issues.jboss.org/browse/LOGTOOL-91
Project: Log Tool
Issue Type: Feature Request
Reporter: David Lloyd
Assignee: James Perkins
Right now I have to do this:
{code}
@Message(id = 28, value = "An unexpected protocol error occurred")
XAException protocolErrorXA(@Property int errorCode);
// ... then later ...
throw Log.log.protocolErrorXA(XAException.XAER_RMFAIL);
{code}
I'd rather be able to do this:
{code}
@Message(id = 28, value = "An unexpected protocol error occurred")
@Property(name = "errorCode", intValue = XAException.XAER_RMFAIL)
XAException protocolErrorXA();
// ... then later ...
throw Log.log.protocolErrorXA();
{code}
The same annotation ({{@Property}}) could be reused by making it multi-valued (i.e.
invisible wrapper annotation) and adding in defaulted {{xxxValue}} parameters (primitive
types, {{Class<XX>}}, and {{String}}) which are rejected when applied directly to a
method parameter.