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

have a @StaticConstructor annotation to mark static factories

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 6
    • tools

      J2SE Version (please include all output from java -version flag)
       java version "1.6.0-ea"
       Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-ea-b23)
       Java HotSpot(TM) Client VM (build 1.6.0-ea-b23, mixed mode, sharing)

      Bug Description:

      More of an RFE, really. Many classes, both in the Java core, and in
      other libraries, use "static constructors" for returning instances to
      the user. At the moment, static constructors are not distinguishable
      from the rest of the static methods. Could we have a @StaticConstructor
      annotation, and get javadoc to group the static constructors after the
      object constructors but before the other methods? This would make it
      much easier to find out how to get an instance, and make APIs that use
      static constructors less scary.


      ###@###.### 2005-2-14 19:24:52 GMT

            Unassigned Unassigned
            tyao Ting-Yun Ingrid Yao (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: