Search in sources :

Example 1 with ModuleSymbol

use of com.sun.tools.javac.code.Symbol.ModuleSymbol in project error-prone by google.

the class VisitorState method inferModule.

/**
 * Infers a module symbol for the given flat class name.
 */
// TODO(cushon): decide how to provide actual -source 9 module support
public ModuleSymbol inferModule(Name flatName) {
    Symtab symtab = getSymtab();
    ModuleSymbol result = symtab.inferModule(Convert.packagePart(flatName));
    if (result != null) {
        return result;
    }
    return symtab.java_base == symtab.noModule ? symtab.noModule : symtab.unnamedModule;
}
Also used : Symtab(com.sun.tools.javac.code.Symtab) ModuleSymbol(com.sun.tools.javac.code.Symbol.ModuleSymbol)

Aggregations

ModuleSymbol (com.sun.tools.javac.code.Symbol.ModuleSymbol)1 Symtab (com.sun.tools.javac.code.Symtab)1