JDK-8163310 : [Tree API] Investigate and implement jx.lang.model searchClass
  • Type: Sub-task
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Priority: P4
  • Status: Resolved
  • Resolution: Won't Fix
  • Submitted: 2016-08-05
  • Updated: 2023-11-02
  • Resolved: 2023-11-02
Related Reports
Duplicate :  
Relates :  
Description
It would be nice if we have suitable convenience method in javax.lang.model to provide this functionality.
Comments
The only (or last) user of the JavaDoc `WorkArounds.searchClass(TypeElement,String)` method was `ThrowsTaglet`, but this use war removed with JDK-8295277. There is thus no more need to implement this method in any official API.
02-11-2023

This should (probably) not be on javax.lang.model. It should (probably) be on the Tree API, because it is searching imports, which are not available/meaningful in the context of the Language Model API.
13-08-2016

Method signature: public TypeElement searchClass(TypeElement klass, String className); see the implementation in WorkArounds.java
05-08-2016