org.eclipse.wst.jsdt.ui

## Class JSdocContentAccess

- java.lang.Object
- - org.eclipse.wst.jsdt.ui.JSdocContentAccess

    public class JSdocContentAccess
    extends java.lang.Object

Helper needed to get the content of a Javadoc comment.

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

Provisional API: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

### Field Summary

Fields
`protected static java.lang.String` `ATTR_DOCUMENTATIONPROVIDER_CLASS`
`static java.lang.String` `EXTENSION_POINT`
`protected static java.lang.String` `TAG_DOCUMENTATIONPROVIDER`

### Method Summary

All Methods Static Methods Concrete Methods
`static java.io.Reader` `getContentReader(IJavaScriptElement element, boolean allowInherited)` Gets the content reader for either an `IMember` or `ILocalVariable`.
`static java.io.Reader` `getContentReader(ILocalVariable declaration, boolean allowInherited)` Gets a reader for an ILocalDeclaration's doc comment content from the source attachment.
`static java.io.Reader` `getContentReader(IMember member, boolean allowInherited)` Gets a reader for an IMember's Javadoc comment content from the source attachment.
`static java.io.Reader` `getHTMLContentReader(IJavaScriptElement element, boolean allowInherited, boolean useAttachedJavadoc)` Gets the HTML content reader for either an `IMember` or `ILocalVariable`.
`static java.io.Reader` `getHTMLContentReader(ILocalVariable variable, boolean allowInherited, boolean useAttachedDoc)` Gets a reader for an ILocalDeclaration documentation comment content.
`static java.io.Reader` `getHTMLContentReader(IMember member, boolean allowInherited, boolean useAttachedJavadoc)` 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`

### Field Detail

#### EXTENSION_POINT

    public static final java.lang.String EXTENSION_POINT

See Also:
  Constant Field Values

#### TAG_DOCUMENTATIONPROVIDER

    protected static final java.lang.String TAG_DOCUMENTATIONPROVIDER

See Also:
  Constant Field Values

#### ATTR_DOCUMENTATIONPROVIDER_CLASS

    protected static final java.lang.String ATTR_DOCUMENTATIONPROVIDER_CLASS

See Also:
  Constant Field Values

### Method Detail

#### getContentReader

    public static java.io.Reader getContentReader(IJavaScriptElement element,
                                                  boolean allowInherited)
                                           throws JavaScriptModelException

Gets the content reader for either an `IMember` or `ILocalVariable`.

Parameters:
  `element` - `IJavaScriptElement` to get the content reader for
  `allowInherited` - For methods with no (Javadoc) comment, the comment of the overridden class is returned if `allowInherited` is `true`.
Returns:
  a reader for the Javadoc comment content or `null` if the element does not contain a Javadoc comment or if no source is available
Throws:
  `JavaScriptModelException` - is thrown when the elements javadoc can not be accessed
See Also:
  `getContentReader(ILocalVariable, boolean)`, `getContentReader(IMember, boolean)`

#### getContentReader

    public static java.io.Reader getContentReader(IMember member,
                                                  boolean allowInherited)
                                           throws JavaScriptModelException

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:
  `JavaScriptModelException` - is thrown when the elements javadoc can not be accessed

#### getContentReader

    public static java.io.Reader getContentReader(ILocalVariable declaration,
                                                  boolean allowInherited)
                                           throws JavaScriptModelException

Gets a reader for an ILocalDeclaration's doc comment content from the source attachment. Returns `null` if the declaration does not have a doc comment or if no source is available.

Parameters:
  `declaration` - The declaration to get the doc of.
  `allowInherited` - For methods with no doc comment, the comment of the overridden class is returned if `allowInherited` is `true` and this is an argument.
Returns:
  Returns a reader for the doc comment content or `null` if the declaration does not contain a doc comment or if no source is available
Throws:
  `JavaScriptModelException` - is thrown when the declaration's doc can not be accessed

#### getHTMLContentReader

    public static java.io.Reader getHTMLContentReader(IJavaScriptElement element,
                                                      boolean allowInherited,
                                                      boolean useAttachedJavadoc)
                                               throws JavaScriptModelException

Gets the HTML content reader for either an `IMember` or `ILocalVariable`.

Parameters:
  `element` - `IJavaScriptElement` to get the Javadoc of
  `allowInherited` - for methods with no (Javadoc) comment, the comment of the overridden class is returned if `allowInherited` is `true`
  `useAttachedJavadoc` - if `true` Javadoc will be extracted from attached Javadoc if there's no source
Returns:
  a reader for the Javadoc comment content in HTML or `null` if the element does not contain a Javadoc comment or if no source is available
Throws:
  `JavaScriptModelException` - is thrown when the elements Javadoc can not be accessed
See Also:
  `getHTMLContentReader(ILocalVariable, boolean, boolean)`, `getHTMLContentReader(IMember, boolean, boolean)`

#### getHTMLContentReader

    public static java.io.Reader getHTMLContentReader(IMember member,
                                                      boolean allowInherited,
                                                      boolean useAttachedJavadoc)
                                               throws JavaScriptModelException

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`
  `useAttachedJavadoc` - if `true` Javadoc will be extracted from attached Javadoc if there's no source
Returns:
  a reader for the Javadoc comment content in HTML or `null` if the member does not contain a Javadoc comment or if no source is available
Throws:
  `JavaScriptModelException` - is thrown when the elements Javadoc can not be accessed

#### getHTMLContentReader

    public static java.io.Reader getHTMLContentReader(ILocalVariable variable,
                                                      boolean allowInherited,
                                                      boolean useAttachedDoc)
                                               throws JavaScriptModelException

Gets a reader for an ILocalDeclaration documentation comment content. and renders the tags in HTML. Returns `null` if the declaration does not contain a doc comment or if no source is available.

Parameters:
  `variable` - the variable declaration to get the doc of.
  `allowInherited` - for methods with no (JSDoc) comment, the comment of the overridden class is returned if `allowInherited` is `true`
  `useAttachedDoc` - if `true` JSDoc will be extracted from attached JSDoc if there's no source
Returns:
  a reader for the JSDoc comment content in HTML or `null` if the member does not contain a JSDoc comment or if no source is available
Throws:
  `JavaScriptModelException` - is thrown when the elements JSDoc can not be accessed