Java Code Examples for com.sun.tools.javac.util.ListBuffer#lb()

The following examples show how to use com.sun.tools.javac.util.ListBuffer#lb() . 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 Project: java-n-IDE-for-Android   File: Type.java    License: Apache License 2.0 5 votes vote down vote up
public static List<Type> filter(List<Type> ts, Filter<Type> tf) {
    ListBuffer<Type> buf = ListBuffer.lb();
    for (Type t : ts) {
        if (tf.accepts(t)) {
            buf.append(t);
        }
    }
    return buf.toList();
}
 
Example 2
Source Project: java-n-IDE-for-Android   File: Printer.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Get a localized string representation for all the types in the input list.
 *
 * @param ts types to be displayed
 * @param locale the locale in which the string is to be rendered
 * @return localized string representation
 */
public String visitTypes(List<Type> ts, Locale locale) {
    ListBuffer<String> sbuf = ListBuffer.lb();
    for (Type t : ts) {
        sbuf.append(visit(t, locale));
    }
    return sbuf.toList().toString();
}
 
Example 3
Source Project: java-n-IDE-for-Android   File: Printer.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * * Get a localized string representation for all the symbols in the input list.
 *
 * @param ts symbols to be displayed
 * @param locale the locale in which the string is to be rendered
 * @return localized string representation
 */
public String visitSymbols(List<Symbol> ts, Locale locale) {
    ListBuffer<String> sbuf = ListBuffer.lb();
    for (Symbol t : ts) {
        sbuf.append(visit(t, locale));
    }
    return sbuf.toList().toString();
}
 
Example 4
Source Project: javaide   File: Type.java    License: GNU General Public License v3.0 5 votes vote down vote up
public static List<Type> filter(List<Type> ts, Filter<Type> tf) {
    ListBuffer<Type> buf = ListBuffer.lb();
    for (Type t : ts) {
        if (tf.accepts(t)) {
            buf.append(t);
        }
    }
    return buf.toList();
}
 
Example 5
Source Project: javaide   File: Printer.java    License: GNU General Public License v3.0 5 votes vote down vote up
/**
 * Get a localized string representation for all the types in the input list.
 *
 * @param ts types to be displayed
 * @param locale the locale in which the string is to be rendered
 * @return localized string representation
 */
public String visitTypes(List<Type> ts, Locale locale) {
    ListBuffer<String> sbuf = ListBuffer.lb();
    for (Type t : ts) {
        sbuf.append(visit(t, locale));
    }
    return sbuf.toList().toString();
}
 
Example 6
Source Project: javaide   File: Printer.java    License: GNU General Public License v3.0 5 votes vote down vote up
/**
 * * Get a localized string representation for all the symbols in the input list.
 *
 * @param ts symbols to be displayed
 * @param locale the locale in which the string is to be rendered
 * @return localized string representation
 */
public String visitSymbols(List<Symbol> ts, Locale locale) {
    ListBuffer<String> sbuf = ListBuffer.lb();
    for (Symbol t : ts) {
        sbuf.append(visit(t, locale));
    }
    return sbuf.toList().toString();
}
 
Example 7
protected final <T> Queue<T> stopIfError(CompileState cs, Queue<T> queue) {
    return shouldStop(cs) ? ListBuffer.<T>lb() : queue;
}
 
Example 8
protected final <T> Queue<T> stopIfError(CompileState cs, Queue<T> queue) {
    return shouldStop(cs) ? ListBuffer.<T>lb() : queue;
}