Package org.eclipse.jdt.ui
Class JavadocContentAccess
- java.lang.Object
-
- org.eclipse.jdt.ui.JavadocContentAccess
-
public class JavadocContentAccess extends Object
Helper needed to get the content of a Javadoc comment.This class is not intended to be subclassed or instantiated by clients.
- Since:
- 3.1
- Restriction:
- This class is not intended to be subclassed by clients.
- Restriction:
- This class is not intended to be instantiated by clients.
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static ReadergetContentReader(IMember member, boolean allowInherited)Gets a reader for an IMember's Javadoc comment content from the source attachment.static ReadergetHTMLContentReader(IMember member, boolean allowInherited)Deprecated.As of 3.2, replaced bygetHTMLContentReader(IMember, boolean, boolean)static ReadergetHTMLContentReader(IMember member, boolean allowInherited, boolean useAttachedJavadoc)Gets a reader for an IMember's Javadoc comment content from the source attachment.
-
-
-
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. Returnsnullif 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 ifallowInheritedistrue.- Returns:
- Returns a reader for the Javadoc comment content or
nullif 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, boolean useAttachedJavadoc) throws JavaModelException
Gets a reader for an IMember's Javadoc comment content from the source attachment. and renders the tags in HTML. Returnsnullif 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 ifallowInheritedistrueuseAttachedJavadoc- iftrueJavadoc will be extracted from attached Javadoc if there's no source- Returns:
- a reader for the Javadoc comment content in HTML or
nullif 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- Since:
- 3.2
-
getHTMLContentReader
@Deprecated public static Reader getHTMLContentReader(IMember member, boolean allowInherited) throws JavaModelException
Deprecated.As of 3.2, replaced bygetHTMLContentReader(IMember, boolean, boolean)Gets a reader for an IMember's Javadoc comment content from the source attachment. and renders the tags in HTML. Returnsnullif 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 ifallowInheritedistrue.- Returns:
- Returns a reader for the Javadoc comment content in HTML or
nullif 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
-
-