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 File: Type.java    From java-n-IDE-for-Android with 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 File: Printer.java    From java-n-IDE-for-Android with 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 File: Printer.java    From java-n-IDE-for-Android with 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 File: Type.java    From javaide with 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 File: Printer.java    From javaide with 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 File: Printer.java    From javaide with 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
Source File: JavaCompiler.java    From java-n-IDE-for-Android with Apache License 2.0 4 votes vote down vote up
protected final <T> Queue<T> stopIfError(CompileState cs, Queue<T> queue) {
    return shouldStop(cs) ? ListBuffer.<T>lb() : queue;
}
 
Example 8
Source File: JavaCompiler.java    From javaide with GNU General Public License v3.0 4 votes vote down vote up
protected final <T> Queue<T> stopIfError(CompileState cs, Queue<T> queue) {
    return shouldStop(cs) ? ListBuffer.<T>lb() : queue;
}