(reflect) Need a way to force a class to be initialized.

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Duplicate
    • Priority: P3
    • None
    • Affects Version/s: 5.0
    • Component/s: core-libs

      There is no direct way to force a class to be initialized. Now that class
      literals do not do that, it would be extremely helpful for there to be a
      direct way to force the initialization. Please add a method

      public Class<T> Class.initialize();

      to force the class to be initialized. That would allow the idiom

      X.class.initialize()

      to be used as a class literal for an initialized class.

            Assignee:
            Joe Darcy
            Reporter:
            Neal Gafter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: