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

provide link to JavaFileObject from Element

XMLWordPrintable

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

      There is no easy way to get from an Element (TypeElement, PackageElement, ModuleElement) to the JavaFileObject for the source or class from which it was read.

      It would be good to add

      JavaFileObject Elements.getJavaFileObject(Element e)

      that returns the information if available, null if not, and IllegalArgumentException if not (type, package, module)

            darcy Joe Darcy
            jjg Jonathan Gibbons
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: