Overview
Locate references to documentation pages and resources.
References can be:- name of a markup document: doc1
- relative of absolute path of markup document
- package name: com.parrot.package
- unqualified class name: MyClass
- qualified class name: com.parrot.MyClass
- class field: MyClass#value or com.parrot.MyClass#value
- class method: MyClass#getValue or MyClass#getValue(int)
Summary
Fields | |
---|---|
private final RootProjectDoc | projectRootDoc |
private final com.sun.javadoc.RootDoc | rootDoc |
from RefProvider | apiRefProviderList, unknownRefProvider |
Constructors | |
---|---|
public | RefLocator(DocPageStore store, Collection<IRefProvider> externalProviders, com.sun.javadoc.RootDoc rootDoc, RootProjectDoc projectRootDoc) Constructor |
Methods | |
---|---|
private void | addMatchingClassDocRefs(String name, List<DocReferenceable> matches) Add DocReferenceable to classes matching the given name to the matches list. |
private void | addMatchingExecutableRef(String className, String member, List<DocReferenceable> matches) Add DocReferenceable to methods matching the given name to the matches list. |
private void | addMatchingFieldRef(String className, String member, List<DocReferenceable> matches) Add DocReferenceable to fields matching the given name to the matches list. |
private void | addMatchingMarkupDocRefs(String name, List<DocReferenceable> matches) Add DocReferenceable to markup documents matching the given name to the matches list. |
private void | addMatchingPackageDocRefs(String name, List<DocReferenceable> matches) Add DocReferenceable to packages matching the given name to the matches list. |
private void | addMatchingResourceDocRefs(String name, List<DocReferenceable> matches) Add DocReferenceable to resource files matching the given name to the matches list. |
public DocReferenceable | find(String name, com.sun.javadoc.SourcePosition sourcePosition) Look for a reference to a package, class, field, method or markup document |
public DocReferenceable | find(String name, com.sun.javadoc.SourcePosition sourcePosition, String markupDocContainer) Look for a reference to a package, class, field, method or markup document, in the context of a markup document path |
private List<DocReferenceable> | findAll(String name) Find a markup doc, package, class, or field or method. |
public String | findIncludedCode(String name, String id, com.sun.javadoc.SourcePosition sourcePosition) |
private MarkupDoc | findMarkupDoc(String markupDocPath, String markupDocContainer) Find a markup doc in the given path, relative or absolute. |
private ResourceDoc | findResourceFile(String resourceFilePath, String markupDocContainer) Find a resource doc in the given path, relative or absolute. |
from RefProvider | getClassDocRef, getExecutableMemberDocRef, getFieldDocRef, getMarkupDocRef, getPackageDocRef, getResourceFileRef |
from Object |
Fields
private final RootProjectDoc projectRootDoc
Constructors
public RefLocator(DocPageStore store, Collection<IRefProvider> externalProviders, com.sun.javadoc.RootDoc rootDoc, RootProjectDoc projectRootDoc)
Constructor
Parameters:
store: page store instance
externalProviders: collection of external reference provider
rootDoc: docClass rootDoc
projectRootDoc: project rootDoc
Methods
Look for a reference to a package, class, field, method or markup document
Parameters:
name: reference name
sourcePosition: current position in the source containing the reference
Returns:
a DocReferenceable, null if not found
public DocReferenceable find(String name, com.sun.javadoc.SourcePosition sourcePosition, String markupDocContainer)
Look for a reference to a package, class, field, method or markup document, in the context of a markup document path
Parameters:
name: reference name.
sourcePosition: current position in the source containing the reference.
markupDocContainer: markup doc container to search for relative references.
Returns:
a DocReferenceable, null if not found.
public String findIncludedCode(String name, String id, com.sun.javadoc.SourcePosition sourcePosition)
Find a markup doc in the given path, relative or absolute.
Parameters:
markupDocPath: path of the doc to find.
markupDocContainer: container path to start for relative paths.
Returns:
a DocReferenceable, null if not found.
Find a resource doc in the given path, relative or absolute.
Parameters:
resourceFilePath: path of the doc to find.
markupDocContainer: container path to start for relative paths.
Returns:
a DocReferenceable, null if not found.
Find a markup doc, package, class, or field or method.
Parameters:
name: name to search
Returns:
list of matching DocReferenceable
Add DocReferenceable to markup documents matching the given name to the matches list.
Parameters:
name: name to search
matches: the list of match to add result to
Add DocReferenceable to resource files matching the given name to the matches list.
Parameters:
name: name to search
matches: the list of match to add result to
Add DocReferenceable to packages matching the given name to the matches list.
Parameters:
name: name to search
matches: the list of match to add result to
Add DocReferenceable to classes matching the given name to the matches list.
Parameters:
name: name to search
matches: the list of match to add result to
Add DocReferenceable to fields matching the given name to the matches list.
Parameters:
className: name of the class to search the field
member: name of the field to search
matches: the list of match to add result to
private void addMatchingExecutableRef(String className, String member, List<DocReferenceable> matches)
Add DocReferenceable to methods matching the given name to the matches list.
Parameters:
className: name of the class to search the field
member: name of the method to search
matches: the list of match to add result to