Public access to the generic signature of a Method

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • None
    • Affects Version/s: 25
    • Component/s: core-libs
    • None

      When generating bytecode based on existing `java.lang.reflect.Method`, there is no way to (easily) retrieve its generic signature.

      For example, when generating a compatible method with the Classfile API, one may need to create a `MethodSignature`, which is very hard to do when extracting individual components (type parameters, exceptions, generic parameters & return type). There could be a simple solution, like `MethodSignature.parseFrom(method.getGenericSignature())`, but `getGenericSignature()` is private in `Method`.

      It would be helpful to provide public API to access the generic signature of a `Method` as `MethodSignature` and/or `String`.

            Assignee:
            Unassigned
            Reporter:
            Nikita Gubarkov
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: