Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6356761

Parameters declaration improvement using annotations

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • 5.0
    • specification
    • x86
    • windows_xp

      A DESCRIPTION OF THE REQUEST :
      People: recently, I discovered that, in SAP ABAP reports, parameters are specified in a very friendly manner, as follows:

      parameter: p_name(8) type c default 'Duke' obligatory,
                           p_age type i.

      With the addition of annotation types in Tiger, I think that the approach may be improved.


      JUSTIFICATION :
      Currently, equivalent functionality is very hard to code in Java, resulting in boiler plate code.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Something like this:

      class RFEDemo
      {
             @parameter(name="name", type="String", default="Duke", required="yes")
             @parameter(name="age", type="Integer")
             public static void main(String[] args)
             {
                         . . .
             }
      }

      ACTUAL -
      Boiler plate code!!!

            abuckley Alex Buckley
            gmanwanisunw Girish Manwani (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: