Java Code Examples for com.sun.tools.doclets.internal.toolkit.Content#isEmpty()

The following examples show how to use com.sun.tools.doclets.internal.toolkit.Content#isEmpty() . 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: HtmlTree.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Adds content for the HTML tag.
 *
 * @param tagContent tag content to be added
 */
public void addContent(Content tagContent) {
    if (tagContent instanceof ContentBuilder) {
        for (Content content: ((ContentBuilder)tagContent).contents) {
            addContent(content);
        }
    }
    else if (tagContent == HtmlTree.EMPTY || tagContent.isValid()) {
        if (content.isEmpty())
            content = new ArrayList<>();
        content.add(tagContent);
    }
}
 
Example 2
Source File: WriterUtils.java    From sarl with Apache License 2.0 5 votes vote down vote up
/** Add a type parameter to the given executable member.
 *
 * @param typeParameters the type parameters.
 * @param htmlTree the output.
 * @param configuration the configuration.
 * @param writer the background writer.
 */
public static void addTypeParameters(Content typeParameters, Content htmlTree,
		ConfigurationImpl configuration, SubWriterHolderWriter writer) {
	if (!typeParameters.isEmpty()) {
		htmlTree.addContent(" "); //$NON-NLS-1$
		htmlTree.addContent(Utils.keyword(Utils.getKeywords().getWithKeyword()));
		htmlTree.addContent(" "); //$NON-NLS-1$
		htmlTree.addContent(typeParameters);
		htmlTree.addContent(" "); //$NON-NLS-1$
	}
}
 
Example 3
Source File: ContentBuilder.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public boolean isEmpty() {
    for (Content content: contents) {
        if (!content.isEmpty())
            return false;
    }
    return true;
}
 
Example 4
Source File: HtmlTree.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Adds content for the HTML tag.
 *
 * @param tagContent tag content to be added
 */
public void addContent(Content tagContent) {
    if (tagContent instanceof ContentBuilder) {
        for (Content content: ((ContentBuilder)tagContent).contents) {
            addContent(content);
        }
    }
    else if (tagContent == HtmlTree.EMPTY || tagContent.isValid()) {
        if (content.isEmpty())
            content = new ArrayList<Content>();
        content.add(tagContent);
    }
}
 
Example 5
Source File: ContentBuilder.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
@Override
public boolean isEmpty() {
    for (Content content: contents) {
        if (!content.isEmpty())
            return false;
    }
    return true;
}
 
Example 6
Source File: HtmlTree.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Adds content for the HTML tag.
 *
 * @param tagContent tag content to be added
 */
public void addContent(Content tagContent) {
    if (tagContent instanceof ContentBuilder) {
        for (Content content: ((ContentBuilder)tagContent).contents) {
            addContent(content);
        }
    }
    else if (tagContent == HtmlTree.EMPTY || tagContent.isValid()) {
        if (content.isEmpty())
            content = new ArrayList<Content>();
        content.add(tagContent);
    }
}
 
Example 7
Source File: ContentBuilder.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
@Override
public boolean isEmpty() {
    for (Content content: contents) {
        if (!content.isEmpty())
            return false;
    }
    return true;
}
 
Example 8
Source File: HtmlTree.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Adds content for the HTML tag.
 *
 * @param tagContent tag content to be added
 */
public void addContent(Content tagContent) {
    if (tagContent instanceof ContentBuilder) {
        for (Content content: ((ContentBuilder)tagContent).contents) {
            addContent(content);
        }
    }
    else if (tagContent == HtmlTree.EMPTY || tagContent.isValid()) {
        if (content.isEmpty())
            content = new ArrayList<Content>();
        content.add(tagContent);
    }
}
 
Example 9
Source File: ContentBuilder.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public boolean isEmpty() {
    for (Content content: contents) {
        if (!content.isEmpty())
            return false;
    }
    return true;
}
 
Example 10
Source File: HtmlTree.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Adds content for the HTML tag.
 *
 * @param tagContent tag content to be added
 */
public void addContent(Content tagContent) {
    if (tagContent instanceof ContentBuilder) {
        for (Content content: ((ContentBuilder)tagContent).contents) {
            addContent(content);
        }
    }
    else if (tagContent == HtmlTree.EMPTY || tagContent.isValid()) {
        if (content.isEmpty())
            content = new ArrayList<Content>();
        content.add(tagContent);
    }
}
 
Example 11
Source File: ContentBuilder.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
@Override
public boolean isEmpty() {
    for (Content content: contents) {
        if (!content.isEmpty())
            return false;
    }
    return true;
}
 
Example 12
Source File: HtmlTree.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Adds content for the HTML tag.
 *
 * @param tagContent tag content to be added
 */
public void addContent(Content tagContent) {
    if (tagContent instanceof ContentBuilder) {
        for (Content content: ((ContentBuilder)tagContent).contents) {
            addContent(content);
        }
    }
    else if (tagContent == HtmlTree.EMPTY || tagContent.isValid()) {
        if (content.isEmpty())
            content = new ArrayList<Content>();
        content.add(tagContent);
    }
}
 
Example 13
Source File: ContentBuilder.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
@Override
public boolean isEmpty() {
    for (Content content: contents) {
        if (!content.isEmpty())
            return false;
    }
    return true;
}
 
Example 14
Source File: HtmlTree.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Adds content for the HTML tag.
 *
 * @param tagContent tag content to be added
 */
public void addContent(Content tagContent) {
    if (tagContent instanceof ContentBuilder) {
        for (Content content: ((ContentBuilder)tagContent).contents) {
            addContent(content);
        }
    }
    else if (tagContent == HtmlTree.EMPTY || tagContent.isValid()) {
        if (content.isEmpty())
            content = new ArrayList<Content>();
        content.add(tagContent);
    }
}
 
Example 15
Source File: ContentBuilder.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public boolean isEmpty() {
    for (Content content: contents) {
        if (!content.isEmpty())
            return false;
    }
    return true;
}
 
Example 16
Source File: HtmlTree.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Adds content for the HTML tag.
 *
 * @param tagContent tag content to be added
 */
public void addContent(Content tagContent) {
    if (tagContent instanceof ContentBuilder) {
        for (Content content: ((ContentBuilder)tagContent).contents) {
            addContent(content);
        }
    }
    else if (tagContent == HtmlTree.EMPTY || tagContent.isValid()) {
        if (content.isEmpty())
            content = new ArrayList<Content>();
        content.add(tagContent);
    }
}
 
Example 17
Source File: ContentBuilder.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public boolean isEmpty() {
    for (Content content: contents) {
        if (!content.isEmpty())
            return false;
    }
    return true;
}