Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-254

[lang] Enhanced Class.forName version

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.2
    • Component/s: None
    • Labels:
      None
    • Environment:

      Operating System: other
      Platform: Other

    • Bugzilla Id:
      36512

      Description

      The standard Class.forName support for primitive types and arrays is not really
      userfriendly as it requires the bytecode specification (eg. "[I" for an integer
      array) rather than the normal type specification as would be used for variable
      declarations (eg. "int[]"). Likewise, it is not possible to get the class for
      "int" and other primitive types with Class.forName, one has to resort to
      "java.lang.Integer" which is not guaranteed to be equal to int.class.

      This proposed feature adds a class that provides such an enhanced Class.forName
      functionality which then could for instance be exposed via commons-lang's
      ClassUtils.

        Attachments

        1. ASF.LICENSE.NOT.GRANTED--TestClassForName.java
          4 kB
          Thomas Dudziak
        2. ASF.LICENSE.NOT.GRANTED--GetClass.patch
          9 kB
          James Carman
        3. ASF.LICENSE.NOT.GRANTED--GetClass.patch
          23 kB
          James Carman
        4. ASF.LICENSE.NOT.GRANTED--GetClass.patch
          22 kB
          James Carman
        5. ASF.LICENSE.NOT.GRANTED--ClassForName.java
          7 kB
          Thomas Dudziak

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              tomdz Thomas Dudziak
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: