Uploaded image for project: 'Log Tool'
  1. Log Tool
  2. LOGTOOL-91

Add ability to provide constant values for properties

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Major
    • 2.1.0.Alpha1
    • None
    • None

    Description

      Right now I have to do this:

          @Message(id = 28, value = "An unexpected protocol error occurred")
          XAException protocolErrorXA(@Property int errorCode);
      // ... then later ...
          throw Log.log.protocolErrorXA(XAException.XAER_RMFAIL);
      

      I'd rather be able to do this:

          @Message(id = 28, value = "An unexpected protocol error occurred")
          @Property(name = "errorCode", intValue = XAException.XAER_RMFAIL)
          XAException protocolErrorXA();
      // ... then later ...
          throw Log.log.protocolErrorXA();
      

      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.

      Attachments

        Activity

          People

            jperkins-rhn James Perkins
            dlloyd@redhat.com David Lloyd
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: