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

Add ability to provide constant values for properties

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

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

      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.

              jperkins-rhn James Perkins
              dlloyd@redhat.com David Lloyd
              Archiver:
              rhn-support-sthamilt Stacey Hamilton

                Created:
                Updated:
                Resolved:
                Archived: