Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-387

org.jboss.forge.parser.java.Method needs getGenericReturnType (or equivalent)

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • 1.0.0.Beta4
    • None
    • None
    • None

      Currently, if I have a method...

      public List<Foo> getList();

      ...then org.jboss.forge.parser.java.Method.getReturnType() returns...

      java.util.List

      There doesn't appear to be a way to get hold of the generic type <Foo>?

      java.lang.Method has a special 'getGenericReturnType' method which returns a ParameterizedType which you can then call 'getActualTypeArguments' on. I don't necessarily like that API, but we need some equivalent to it.

              lincolnthree Lincoln Baxter III (Inactive)
              kennardconsulting Richard Kennard (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: