org.netbeans.modules.java.sourceui/1 1.23.1 1

org.netbeans.api.java.source.ui
Class ElementJavadoc

java.lang.Object
  extended by org.netbeans.api.java.source.ui.ElementJavadoc

public class ElementJavadoc
extends Object

Utility class for viewing Javadoc comments as HTML.


Method Summary
static ElementJavadoc create(CompilationInfo compilationInfo, Element element)
          Creates an object describing the Javadoc of given element.
static ElementJavadoc create(CompilationInfo compilationInfo, Element element, Callable<Boolean> cancel)
          Creates an object describing the Javadoc of given element.
 Action getGotoSourceAction()
          Gets action capable of juming to source of the Element this Javadoc belongs to.
 String getText()
          Gets the javadoc comment formated as HTML.
 Future<String> getTextAsync()
          Gets the javadoc comment formated as HTML.
 URL getURL()
          Gets URL of the external javadoc.
 ElementJavadoc resolveLink(String link)
          Resolves a link contained in the Javadoc comment to an object describing the linked javadoc
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static final ElementJavadoc create(CompilationInfo compilationInfo,
                                          Element element)
Creates an object describing the Javadoc of given element. The object is capable of getting the text formated into HTML, resolve the links, jump to external javadoc.

Parameters:
compilationInfo - CompilationInfo
element - Element the javadoc is required for
Returns:
ElementJavadoc describing the javadoc

create

public static final ElementJavadoc create(CompilationInfo compilationInfo,
                                          Element element,
                                          Callable<Boolean> cancel)
Creates an object describing the Javadoc of given element. The object is capable of getting the text formated into HTML, resolve the links, jump to external javadoc.

Parameters:
compilationInfo - CompilationInfo
element - Element the javadoc is required for
cancel - a Callable to signal the cancel request
Returns:
ElementJavadoc describing the javadoc
Since:
1.15

getText

public String getText()
Gets the javadoc comment formated as HTML.

Returns:
HTML text of the javadoc

getTextAsync

public Future<String> getTextAsync()
Gets the javadoc comment formated as HTML.

Returns:
Future of HTML text of the javadoc
Since:
1.20

getURL

public URL getURL()
Gets URL of the external javadoc.

Returns:
Text of the Javadoc comment formated as HTML

resolveLink

public ElementJavadoc resolveLink(String link)
Resolves a link contained in the Javadoc comment to an object describing the linked javadoc

Parameters:
link - Link which has to be resolved
Returns:
ElementJavadoc describing the javadoc of liked element

getGotoSourceAction

public Action getGotoSourceAction()
Gets action capable of juming to source of the Element this Javadoc belongs to.

Returns:
Action going to the source of the Element described by this javadoc.

org.netbeans.modules.java.sourceui/1 1.23.1 1

Built on December 5 2011.  |  Portions Copyright 1997-2011 Sun Microsystems, Inc. All rights reserved.