Eclipse JDT
Release 3.1

org.eclipse.jdt.ui
Class JavadocContentAccess

java.lang.Object
  extended byorg.eclipse.jdt.ui.JavadocContentAccess

public class JavadocContentAccess
extends Object

Helper needed get the content of a Javadoc comment.

This class is not intended to be subclassed or instantiated by clients.

Since:
3.1

Method Summary
static Reader getContentReader(IMember member, boolean allowInherited)
          Gets a reader for an IMember's Javadoc comment content from the source attachment.
static Reader getHTMLContentReader(IMember member, boolean allowInherited)
          Gets a reader for an IMember's Javadoc comment content from the source attachment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getContentReader

public static Reader getContentReader(IMember member,
                                      boolean allowInherited)
                               throws JavaModelException
Gets a reader for an IMember's Javadoc comment content from the source attachment. The content does contain only the text from the comment without the Javadoc leading star characters. Returns null if the member does not contain a Javadoc comment or if no source is available.

Parameters:
member - The member to get the Javadoc of.
allowInherited - For methods with no (Javadoc) comment, the comment of the overridden class is returned if allowInherited is true.
Returns:
Returns a reader for the Javadoc comment content or null if the member does not contain a Javadoc comment or if no source is available
Throws:
JavaModelException - is thrown when the elements javadoc can not be accessed

getHTMLContentReader

public static Reader getHTMLContentReader(IMember member,
                                          boolean allowInherited)
                                   throws JavaModelException
Gets a reader for an IMember's Javadoc comment content from the source attachment. and renders the tags in HTML. Returns null if the member does not contain a Javadoc comment or if no source is available.

Parameters:
member - The member to get the Javadoc of.
allowInherited - For methods with no (Javadoc) comment, the comment of the overridden class is returned if allowInherited is true.
Returns:
Returns a reader for the Javadoc comment content in HTLM or null if the member does not contain a Javadoc comment or if no source is available
Throws:
JavaModelException - is thrown when the elements javadoc can not be accessed

Eclipse JDT
Release 3.1

Copyright (c) IBM Corp. and others 2000, 2005. All Rights Reserved.