How to get imports of a class OR how to fix javadoc-@link/@see

I'm generating classes based on existing classes. The new code also contains the javadoc-comments. These comments can contain @link- and @see-tags.
In the original source everything works nicely since all necessary classes are imported. However, inside the generated class I currently don't have those imports available to me (I'd assume that TypeElement would provide a method to get them, but it doesn't). One way would be to run through all comments and replace all class names with the fully qualified name. However, that's one time consuming process and I know that at one point people will forget to always write the fully qualified name.
The main goal is to have javadoc generate the documentation with all cross-linking working.
Is there a way to make @link- and @see-tags work?

Darryl Burke wrote:
I don't think what you're looking for is possible, and I don't think it can be possible. Imports disambiguate classes.
Without imports, how can any system possibly differentiate between java.util.List and java.awt.List? or the three Timers in the JDK? or indeed any of your own classes that might share the same name.
dbThat's why I'm looking for a way to get those imports. If I access any type in the annotation processor I always get the fully qualified name. Since in a way I am the annotation processor, I'd assume that I have access to how the compiler figured out which List the original source refers to.
I mean if the code is
java.util.List<String> myList;it's easy. However, I usually code
import java.util.List;
List<String> myList;and the compiler does the match. If the processor accesses the type of myList, it sees java.util.List in both variations. Obviously the compiler did some magic there. In my naive thinking I'd assume that I get access to the magic. The import declaration at the top of the source would be the "magic" to me.
The tragedy starts if the original code looks like this:
import java.util.List;
List<String> myList;
java.awt.List myGorgeousList;
/** blah blah {@link List} blah
*/This is the reason why I can't collect all kinds of types I run into while parsing the original source and simply pick the first matching one. I'd end up with both java.util.List and java.awt.List. Now how would I know which List the comment is referring to? I can only do this if I have access to imports. Then I'd see that there's a List declared as java.util.List. Since the List in the comment isn't fully qualified, java.util.List would be my choice.
But I don't have this! I already checked the API of Java SE 6, whether there is some getter-method with "import" in its name, but I couldn't find anything. :(
If I code something in an ambiguous fashion, the compiler complains and I can fix this. However, with my current knowledge I can't think of a way to solve the ambiguity inside my processor.
Which is why I started this thread :)

Similar Messages

  • How to fix Action Link Issue in Table and Pivot Table when used Section

    My OBIEE Version: OBIEE 11.1.1.6.5
    Issue Description: Action links (Navigate to BI Content) doesn't work in PIVOT TABLE or TABLE object when used Section area (one or more columns in Section area).
    If you want to recreate this issue please follow next steps:
    1.     First of all you have to create one analyse with min 3 columns (for example Time.“Calendar date“, Product.Product, „Base Fact“. Revenue -> from Sample Sales Lite )
    2.     From column properties -> Set value Action Link Interaction on some column for example Product.Product (choose Navigate to BI Content -> any created BI report )
    3.     Click Results Tab choose Pivot Table and assigned one dimension column to Section area
    4.     Click preview icon
    5.     When you click on action link nothing happens
    6.     If you drug and drop column from Section Area to Excluded, Table or Pivot table Area then Action Link works perfectly
    How to fix this issue?
    I'll be grateful for any help!

    This is Bug:15922681 - ACTION LINK NAVIGATE TO BI CONTENT DOES NOT WORK WITH ATTRIBUTE IN SECTION
    Upgrade to 11.1.1.6.6 will fix this issue.

  • My iphone 5c get an unknown error(1).how to fix it?

    my iphone 5c get an unknown error(1).how to fix it?

    See this support document regarding update errors, Get help with iOS update and restore errors - Apple Support    however, generally an error 1 is a hardware error, and you may have to make an appointment at the Genius Bar of the nearest Apple Store or Authorized Apple Service provider.
    Check for hardware issues
    Related errors: 1, 3, 11, 12, 13, 14, 16, 20, 21, 23, 26, 27, 28, 29, 34, 35, 36, 37, 40, 1002, 1004, 1011, 1012, 1014, 1667, or 1669.
    These errors mean that your device or computer might have a hardware issue that stops the update or restore from completing.
    Check that your security software and settings aren't blocking your device from communicating with the Apple update server.
    Then try to restore your iOS device two more times while connected with a cable, computer, and network you know are good.
    Make sure that your security software and settings are allowing communication between your device and update servers.
    If you still see the error message when you update or restore, contact Apple support.

  • FireFox 3.6 and Adobe Reader X. Reader X PDFs opened within the browser contain links, which do not work. Anyone got clues on why the links fail and how to fix?

    When we rolled out ReaderX and AcrobatX we uncheck the Diaply PDF in Browser window. OK with IE, but ignored in FireFox (3.6.16). We can live with that except the PDFs have links to other URLs and clicking on them is ignored. Same PDF opened outside the browser the links work fine. FireFox with Reader 9.4.0 no problem. Reader X with IE no problem. I can fix the Display in Browser with a change to firefox.js, but have not figured out how to fix the links when the PDF is displayed within the browser.

    My replies are in Bold.
    Thank you for your response and message.
    1. Are you seeing this problem with all kinds of PDF's or some specific  kinds like secure PDF's (with doc open password or printing  restrcitions), reader extended PDF's or PDF forms.
    This problem is with all kind's of PDF's.
    2. Are you opening a locally saved PDF by doing a drag drop in the  browser or right click and open with IE/FF or directly opening a PDF  hosted on the internet?
    It doesn't matter. However I do it, I see this problem in Firefox, IE & Google Chrome.
    3.  Can you also check the version of the Reader X browser plugin? you  could find it at C:\Program Files\Common  Files\Adobe\Acrobat\ActiveX\AcroPDF.dll. Right click -> Properties  -> Details
    If version is 9.0.x then you could try a clean install of Reader X.
    I have checked it. It's the latest plug-in (though at the moment, I have gone back to Adobe Reader 9.4.1, as I've mentioned before, because I need the reader to be working fine for my work and daily life. I am just waiting for a fix before I try Adobe Reader X again.
    As I've mentioned before, I am seeing this issue ONLY on my Windows 7 Ultimate (Laptop). In the desktop's at work, with Windows XP / Vista, I don't see it. Adobe Reader is working fine, browser integration is fine, the floating tool bar works fine, the right click menu pop' up where the right click is done...I can also save PDF' from the main toolbar at the top and so on...
    I really have run out of ideas.... and I am very surprised that no expert support personnel (if at all there is one) have dropped by or said anything or mentioned anything about this.
    Anyway.... Cheers.

  • Itunes store request error 4002? How to fixs it?

    Try to connect to itunes match server but popup dialog box show "itunes store request error 4002"? How to fixs it?

    See if this post fixes it, it seems to have done so for a number of users : https://discussions.apple.com/message/20443828#20443828

  • The display on my ipod touch is permanently zoomed. what did I do and how to fix it?

    the display on my ipod touch is permanently zoomed. what did I do and how to fix it?

    See:
    iPhone and iPod touch: Home screen icons are magnified or large

  • How to fix when restore. it error 4013?

    hey guy. help me please. when i try to restore it error 4013 how to fix it please.

    See this discussion: https://discussions.apple.com/message/23183544#23183544

  • How to fix the memory usage of Ely`s FlexBook is insanely increasing when turn page that contains large images?

    Hi,
         I am using flexbook for newspaper project. We have lots of huge size images in our app,all more than 1 MB. I use SuperImage as flexbook content,I also noticed that the application was using huge amounts of memory and crashed IE6, IE7,IE8 and Firefox. I found that flexbook updateDisplayList method call many times and each time flexbookpage call copyInto method when turg page,this cause memory growing. And memory not released when call commitProperties method.
    I would really appriciate any help because I have no clue how to fix it.(我的英语不好,但是我真的很着急。)
    See my partial code below how I am using the flexbook.
         //从后台Java代码得到报纸页面集合
         var list_pages: ArrayCollection = event.result as ArrayCollection;
         pageList = list_pages.toArray();
         //显示右侧报纸版面列表
         getPageListDisp();
         //画布擦除所有子元素
         can.removeAllChildren();
         //创建FlexBook
         var book:FlexBook =new FlexBook();
         book.height=0.9*h;
         book.width=0.8*w;
        //FlexBook需要配置的属性
         book.itemSize="halfPage";
         book.animateCurrentPageIndex=false;
         book.animatePagesOnTurn=false;
         book.setStyle("edgeAndCornerSize",120);//翻动的页脚大小
         book.setStyle("activeGrabArea",1);//把翻动的范围设置为页边
         book.scaleX=sldrb.value;//设置book的放大比例
         book.scaleY=sldrb.value;
        var con:Array = book.content;//为book添加报纸版面
        con.push(new Image());
         for(var i:int=0;i<pageList.length;i++){
         var img:Image=new Image();
         img.source=pageList[i].pageBigImgUrl;
         img.maintainAspectRatio=true;
         con.push(img);
        book.content = con;
         can.addChild(book);
    <mx:Panel id="test1" width="80%" height="100%" horizontalScrollPolicy="off" verticalScrollPolicy="off" paddingTop="15" paddingBottom="15">
        <mx:Canvas id="can" scaleX="{sldrb.value}" scaleY="{sldrb.value}" click="MouseEventFunc(event)" borderColor="#8EC7EF" backgroundColor="#FFFFFF" horizontalScrollPolicy="off" verticalScrollPolicy="off" alpha="1.0" buttonMode="true" mouseDown="MouseEventFunc(event)" mouseUp="MouseEventFunc(event)">
          </mx:Canvas>
       </mx:Panel>

    Or you could include a width to your body style:
    body {
    background-image: url(Logo/sky1.jpg);
    background-position: center center;
    background-attachment: fixed;
    width: 75%;}
    It might work or not depending on your other color scheme.

  • My iphone 5 problem auto restart how to fix?

    my iphone 5 1 day 10-12 restart what problem??? how to fix??

    See this for troubleshooting the touchscreen. If the screen on your iPhone, iPad, or iPod touch doesn't respond to touch - Apple Support

  • How to fix album splitting

    Has anyone ever had the problem where iTunes takes 1 song from an album and put it as a seperate album that has the exact same information as the original and no matter how many times you change the information so that they're exactly the same they are still always split? Does anyone know how to fix this?

    See my previous post on Grouping Tracks Into Albums, in particular the topic One album, still too many covers.
    tt2

  • How to import a java class in a JSP

    Hi All,
    I have a java class file called myTest.class (i made after compilation of myTest.java). I have a JSP page that uses this java class file.
    These 2 files are in same folder called c:/test
    and iam importing this java class file into my jsp file and that too at the start of this jsp file:
    <%@page import="myTest" %>
    BUt iam getting an error ..............when iam running this JSP page:
    /opt/bea81sp2/user_projects/domains/wliDomain/./Managed2/.wlnotdelete/extract/Managed2_myTest_myTest/jsp_servlet/__test.java:20: '.' expected
    probably occurred due to an error in /test.jsp line 5:
    <%@page import="myTest" %>
    Please advise how to solve this problem
    -sangita

    Don't bother with the import
    when iam not importing this class file into my JSP, then on my JSP, the class file is not found.
    Here is my code: and these 2 class file are in c:/test
    import org.apache.tools.ant.taskdefs.Ant;
    import org.apache.tools.ant.taskdefs.Property;
    import org.apache.tools.ant.types.*;
    import org.apache.tools.ant.*;
    import org.apache.tools.ant.taskdefs.ExecTask;
    import org.apache.tools.ant.types.Commandline;
    import java.io.File;
    * Creates an Ant project to run an Ant build
    * @author myself
    * @version 1.0
    public class RunTest extends Ant {
        String applicationName;
        String buttonClicked;
        String boxName;
        String targetName;
        public void applicationName(String applicationName){
         this.applicationName = applicationName;
        public void boxName(String boxName){
         this.boxName = boxName;
        public void buttonClicked(String buttonClicked){
         this.buttonClicked = buttonClicked;
      public RunTest() {
    public void goTest() {
         if(this.buttonClicked.equalsIgnoreCase("deploy") && this.applicationName.equalsIgnoreCase("scsmail") && this.boxName.equalsIgnoreCase("testnet")){
           this.targetName = "deploy-scsmail-testnet";
         if(this.buttonClicked.equalsIgnoreCase("undeploy") && this.applicationName.equalsIgnoreCase("scsmail") && this.boxName.equalsIgnoreCase("testnet")){
           this.targetName = "undeploy-scsmail-testnet";
        Project project = new Project();
        project.init();
        System.out.println("printing 1 ....");
        ExecTask exec = new ExecTask();
        exec.setProject(project);
        exec.setExecutable("/opt/bea/weblogic81/server/bin/ant.bat");
         exec.setDir(new java.io.File("/export/home/beamon/bin"));
         Commandline.Argument arg = exec.createArg();
         // arg.setLine("-f scsmail.xml test -listener org.apache.tools.ant.XmlLogger -logfile D:/antProject/src/log.xml");
         arg.setLine("-f build.xml "+ targetName + " -listener org.apache.tools.ant.XmlLogger -logfile /export/home/beamon/bin/log.xml");
         System.out.println("printing 2....");
        //exec.setOutput(new File("D:/antProject/logs/prob.txt"));
        exec.execute();
        System.out.println("printing 3....");
    -----------------------the JSP page is called as test.jsp
    <%@page contentType="text/html" %>
    <%@page import="java.io.*" %>
    <%@page import="java.util.*" %>
    <%@page import="java.net.*" %>
    <%@page import="RunTest" %>
    <HTML>
    <TITLE>TESTING ANT GUI</TITLE>
    <HEAD>
    <META HTTP-EQUIV="Refresh" CONTENT="3000" >
    <meta http-equiv="Cache-Control" content="no-cache">
    </HEAD>
    <BODY BGCOLOR="silver" TEXT="333333">
    <table border=0>
    <tr align="left"><td align="left"><FONT SIZE="-1"><B>  Test Page <FONT SIZE="-1"><B></td></tr>
    </table>
    <hr></center>
    <form action="./test.jsp" method="POST" name="testForm">
    <table>
    <tr>
    <td>
    <select name="appName" size=1>
    <option value="">Select Application Name
    <option value="scsmail">scsMail
    <option value="clientmanager">ClientManager
    </select>
    </td>
    <td>
    <select name="boxName" size=1>
    <option value="">Select Box Name
    <option value="testnet">TestNet
    <option value="production">Production
    </select>
    </td>
    </table>
    <table>
    <input type="submit" name="deploy" value="deploy">
    <input type="submit" name="undeploy" value="undeploy">
    </table>
    <%
       RunTest rt = new RunTest();
       rt.applicationName(request.getParameter("appName"));
        String deployButton = "";
        deployButton=request.getParameter("deploy");
        String undeployButton = "";
        undeployButton=request.getParameter("undeploy");
        if(!deployButton.equalsIgnoreCase("")){
            rt.buttonClicked(request.getParameter("deployButton"));
        if(!undeployButton.equalsIgnoreCase("")){
            rt.buttonClicked(request.getParameter("undeployButton"));
       rt.boxName(request.getParameter("boxName"));
        rt.goTest();
    %>
    </form>
    </table>
    </BODY>
    </HTML>

  • How do I convert an excel (2008) document to Numbers?  When I drag the Excel document onto the Numbers icon I get, "Import error.  The file format is invalid"

    How can I convert an Excel (2008) document to Numbers.  When I drag the Excel document onto the Numbers icon I get, "Import error.  The file format is invalid.

    That extension identifies the most current Excel file format, a format that can be opened by Numbers '09 (and by Numbers '08).
    A check with Numbers '09 shows it capable of opening .xlsx files when right-clicked (and Numbers chose as the application to open, when double-clicked (if Numbers has been set as the default application to open this type of file, or when dragged to the Numbers icon in the dock.
    I see two possibilities for Numbers inability to open it and the message you receive:
    1. The file is not actually an Excel file, and the sender has added the .xlsx extension to the filename manually.
    2. The file is an Excel file, but has somehow been corrupted.
    Have you tried opening the file with a different application? The open source Office suites, OpenOffice.org, LibreOffice and NeoOffice can also open .xlsx files. If they're unable to open this one, that would point toward the file itself being faulty. You can download these applications from their rspective websites, linked in the names above. All request a donation to support future development, but only Neo requires one to have been made recently, and that only for the current release (which won't be necessary to open .xlsx files).
    Regards,
    Barry

  • How to import user defined class in UIX page?

    Does anyone know how to import user defined class in UIX page so that the class can be called in the javascript in the UIX ?
    Thks & Rgds,
    Benny

    what you are referring to is not javascript.
    it is JSP scriptlets. These are very different.
    In order to keep a strict separation between View and Controller, it is not possible to run arbitrary java code from within your UIX code.
    However, you can run java code from within a UIX event handler; see:
    http://otn.oracle.com/jdeveloper/help/topic?inOHW=true&linkHelp=false&file=jar%3Afile%3A/u01/app/oracle/product/IAS904/j2ee/OC4J_ohw/applications/jdeveloper904/jdeveloper/helpsets/jdeveloper/uixhelp.jar!/uixdevguide/introducingbaja.html
    event handler code is run before the page is rendered.

  • How do I get imported in PS(CC) the fonts Photoshop magazine sends me on her CD.

    How do I get imported in PS(CC) the fonts Photoshop magazine sends me on her CD?

    You will get better answers on the PS forum. The magic word is "color management" (or in your case, lack thereof).
    Mylenium

  • How to get list of all class names in a package

    hi,
    how can i get all the names of classes in a specified package, for example, if i want to get all names of
    classes in package java.util through java application.

    hi,
    if u read my question with open eyes , i wrote " with java application" not with java API .

Maybe you are looking for

  • "Firefox is already running" error while opening a Firefox Document

    I am a web developer, so I decided to have different versions of Firefox in order to test my web pages. Thus I decided to install Firefox 3.6 in "C:\Archivos de programa\Mozilla Firefox\Firefox 3.6", Firefox 4 in "C:\Archivos de programa\Mozilla Fire

  • Change the report type.

    I'm using a report for determine the top applications. How can modify the report to get session count and bytes trasmitted on the same report? Thanks, and happy new year! Andrea.

  • No entry in table T001P when running time eval

    Hi, Can someone tell me, why this error occurs. "No entry in table T001P" when running time evaluation PT60. I checked his Infotype 1 and has the Personal Area/Subarea assigned. Thanks, Swarna.

  • Dump occurs....is it becasue of kernal change ?

    Hi, I got the short dump with Runtime Error DBIF_RSQL_INVALID_CURSOR Except.                CX_SY_OPEN_SQL_DB Invalid interruption of a database selection. Is it possible because kernal change or it's a normal program error? what is the more possible

  • SNMP v.3 configuration

    Hi All, I need some clarification about the snmp  v3 configuration. The  below configuration is correct / i can proceed this. access-list 99 permit 1.1.1.1!!LMS  Server!! access-list  99 permit 2.2.2.2!! CSMARS Server!! snmp-server group test v3 auth