XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: tbd_major
    • Component/s: core-libs
    • Labels:
      None

      Description

      Consider adding a selection of commonly useful bootstrap methods for returning constant values, such as for:

      - loading a primitive class (e.g. int.class)

      - loading a primitive value smaller that int (boolean, byte, char and short)

      - loading a default value of a given type (null, zero, value-type default)

      - loading a named (static final) constant from a class, or (as a special case) an enum member

      - loading a regex Pattern

      - loading a VarHandle

      - loading a value returned from a factory method or perhaps invokers that are method handle based (so a resulting method handle from a combinatorial operation or a transformation is a constant).

      - as a special case of factories, computing List.of, Map.of, Set.of on a list of constants


      Certain bootstrap methods may be required for the constant folding language and intrinsic support for ldc and invokedynamic (see JDK-8178320).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              psandoz Paul Sandoz
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: