com.sun.tools.doclets.internal.toolkit.util.DocFinder Java Examples

The following examples show how to use com.sun.tools.doclets.internal.toolkit.util.DocFinder. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SpecificationTaglet.java    From kodkod with MIT License 6 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public Content getTagletOutput(Doc doc, TagletWriter writer) throws IllegalArgumentException {
	Tag[] tags = doc.tags(getName());
	if (tags.length==0 && doc instanceof MethodDoc) { // inherit if necessary and possible
		final DocFinder.Output inheritedDoc = DocFinder.search(new DocFinder.Input((MethodDoc) doc, this));
		tags = inheritedDoc.holderTag == null ? tags : new Tag[] {inheritedDoc.holderTag};
	}
	if (tags.length==0)
		return null;
	final StringBuilder out = writeHeader(new StringBuilder());
	for(Tag tag : tags) { 
		writeTag(out, tag, writer);
	}
	return new RawHtml(out.toString());
}
 
Example #2
Source File: SpecificationTaglet.java    From org.alloytools.alloy with Apache License 2.0 6 votes vote down vote up
/**
 * {@inheritDoc}
 * @see com.sun.tools.doclets.internal.toolkit.taglets.Taglet#getTagletOutput(com.sun.javadoc.Doc, com.sun.tools.doclets.internal.toolkit.taglets.TagletWriter)
 */
@Override
public TagletOutput getTagletOutput(Doc doc, TagletWriter writer) throws IllegalArgumentException {
	Tag[] tags = doc.tags(getName());
	if (tags.length==0 && doc instanceof MethodDoc) { // inherit if necessary and possible
		final DocFinder.Output inheritedDoc = DocFinder.search(new DocFinder.Input((MethodDoc) doc, this));
		tags = inheritedDoc.holderTag == null ? tags : new Tag[] {inheritedDoc.holderTag};
	}
	if (tags.length==0)
		return null;
	final StringBuilder out = writeHeader(new StringBuilder());
	for(Tag tag : tags) { 
		writeTag(out, tag, writer);
	}
	return new TagletOutputImpl(out.toString());
}
 
Example #3
Source File: SimpleTaglet.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void inherit(DocFinder.Input input, DocFinder.Output output) {
    Tag[] tags = input.element.tags(tagName);
    if (tags.length > 0) {
        output.holder = input.element;
        output.holderTag = tags[0];
        output.inlineTags = input.isFirstSentence
                ? tags[0].firstSentenceTags() : tags[0].inlineTags();
    }
}
 
Example #4
Source File: SpecificationTaglet.java    From kodkod with MIT License 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public void inherit(DocFinder.Input input, DocFinder.Output output) {
	if (input.element != null && input.element.isMethod()) {
		final Tag[] tags = input.element.tags(tagName);
		if (tags.length > 0) {
			output.holder = input.element;
			output.holderTag = tags[0];
			output.inlineTags = input.isFirstSentence ?
					tags[0].firstSentenceTags() : tags[0].inlineTags();
		} 
	} 
}
 
Example #5
Source File: SimpleTaglet.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void inherit(DocFinder.Input input, DocFinder.Output output) {
    Tag[] tags = input.element.tags(tagName);
    if (tags.length > 0) {
        output.holder = input.element;
        output.holderTag = tags[0];
        output.inlineTags = input.isFirstSentence
                ? tags[0].firstSentenceTags() : tags[0].inlineTags();
    }
}
 
Example #6
Source File: SimpleTaglet.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void inherit(DocFinder.Input input, DocFinder.Output output) {
    Tag[] tags = input.element.tags(tagName);
    if (tags.length > 0) {
        output.holder = input.element;
        output.holderTag = tags[0];
        output.inlineTags = input.isFirstSentence
                ? tags[0].firstSentenceTags() : tags[0].inlineTags();
    }
}
 
Example #7
Source File: SimpleTaglet.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void inherit(DocFinder.Input input, DocFinder.Output output) {
    Tag[] tags = input.element.tags(tagName);
    if (tags.length > 0) {
        output.holder = input.element;
        output.holderTag = tags[0];
        output.inlineTags = input.isFirstSentence
                ? tags[0].firstSentenceTags() : tags[0].inlineTags();
    }
}
 
Example #8
Source File: SimpleTaglet.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void inherit(DocFinder.Input input, DocFinder.Output output) {
    Tag[] tags = input.element.tags(tagName);
    if (tags.length > 0) {
        output.holder = input.element;
        output.holderTag = tags[0];
        output.inlineTags = input.isFirstSentence
                ? tags[0].firstSentenceTags() : tags[0].inlineTags();
    }
}
 
Example #9
Source File: SimpleTaglet.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void inherit(DocFinder.Input input, DocFinder.Output output) {
    Tag[] tags = input.element.tags(tagName);
    if (tags.length > 0) {
        output.holder = input.element;
        output.holderTag = tags[0];
        output.inlineTags = input.isFirstSentence
                ? tags[0].firstSentenceTags() : tags[0].inlineTags();
    }
}
 
Example #10
Source File: SimpleTaglet.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void inherit(DocFinder.Input input, DocFinder.Output output) {
    Tag[] tags = input.element.tags(tagName);
    if (tags.length > 0) {
        output.holder = input.element;
        output.holderTag = tags[0];
        output.inlineTags = input.isFirstSentence
                ? tags[0].firstSentenceTags() : tags[0].inlineTags();
    }
}
 
Example #11
Source File: SimpleTaglet.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void inherit(DocFinder.Input input, DocFinder.Output output) {
    Tag[] tags = input.element.tags(tagName);
    if (tags.length > 0) {
        output.holder = input.element;
        output.holderTag = tags[0];
        output.inlineTags = input.isFirstSentence
                ? tags[0].firstSentenceTags() : tags[0].inlineTags();
    }
}
 
Example #12
Source File: InheritableTaglet.java    From openjdk-jdk9 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Given an {@link com.sun.tools.doclets.internal.toolkit.util.DocFinder.Output}
 * object, set its values with the appropriate information to inherit
 * documentation.
 *
 * @param input  the input for documentation search.
 * @param output the output for documentation search.
 */
void inherit(DocFinder.Input input, DocFinder.Output output);
 
Example #13
Source File: InheritableTaglet.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Given an {@link com.sun.tools.doclets.internal.toolkit.util.DocFinder.Output}
 * object, set its values with the appropriate information to inherit
 * documentation.
 *
 * @param input  the input for documentation search.
 * @param output the output for documentation search.
 */
void inherit(DocFinder.Input input, DocFinder.Output output);
 
Example #14
Source File: InheritableTaglet.java    From hottub with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Given an {@link com.sun.tools.doclets.internal.toolkit.util.DocFinder.Output}
 * object, set its values with the appropriate information to inherit
 * documentation.
 *
 * @param input  the input for documentation search.
 * @param output the output for documentation search.
 */
void inherit(DocFinder.Input input, DocFinder.Output output);
 
Example #15
Source File: InheritableTaglet.java    From openjdk-8-source with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Given an {@link com.sun.tools.doclets.internal.toolkit.util.DocFinder.Output}
 * object, set its values with the appropriate information to inherit
 * documentation.
 *
 * @param input  the input for documentation search.
 * @param output the output for documentation search.
 */
void inherit(DocFinder.Input input, DocFinder.Output output);
 
Example #16
Source File: InheritableTaglet.java    From openjdk-jdk8u with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Given an {@link com.sun.tools.doclets.internal.toolkit.util.DocFinder.Output}
 * object, set its values with the appropriate information to inherit
 * documentation.
 *
 * @param input  the input for documentation search.
 * @param output the output for documentation search.
 */
void inherit(DocFinder.Input input, DocFinder.Output output);
 
Example #17
Source File: InheritableTaglet.java    From openjdk-8 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Given an {@link com.sun.tools.doclets.internal.toolkit.util.DocFinder.Output}
 * object, set its values with the appropriate information to inherit
 * documentation.
 *
 * @param input  the input for documentation search.
 * @param output the output for documentation search.
 */
void inherit(DocFinder.Input input, DocFinder.Output output);
 
Example #18
Source File: InheritableTaglet.java    From jdk8u60 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Given an {@link com.sun.tools.doclets.internal.toolkit.util.DocFinder.Output}
 * object, set its values with the appropriate information to inherit
 * documentation.
 *
 * @param input  the input for documentation search.
 * @param output the output for documentation search.
 */
void inherit(DocFinder.Input input, DocFinder.Output output);
 
Example #19
Source File: InheritableTaglet.java    From TencentKona-8 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Given an {@link com.sun.tools.doclets.internal.toolkit.util.DocFinder.Output}
 * object, set its values with the appropriate information to inherit
 * documentation.
 *
 * @param input  the input for documentation search.
 * @param output the output for documentation search.
 */
void inherit(DocFinder.Input input, DocFinder.Output output);