static JCDiagnostic kindNames(int kind) {
        StringBuffer key = new StringBuffer();
        key.append("kindname");
        if ((kind & VAL) != 0)
            key.append(((kind & VAL) == VAR) ? ".variable" : ".value");
        if ((kind & MTH) != 0) key.append(".method");
        if ((kind & TYP) != 0) key.append(".class");
        if ((kind & PCK) != 0) key.append(".package");
        return JCDiagnostic.fragment(key.toString(), kind);
    }