@SuppressWarnings("WeakerAccess") // Used by ConfigGenMojo
    public static boolean makeConfig(MakeConfigProperties properties) throws FileNotFoundException {
        for (File specFile : properties.specFiles) {
            String name = specFile.getName();
            if (name.endsWith(".def")) name = name.substring(0, name.length() - 4);

            DefParser parser = new DefParser(name, new FileReader(specFile));
            parser.enableSystemErr();
            InnerCNode configRoot = parser.getTree();
            checkNamespaceAndPacakge(name, configRoot, isCpp(properties));

            if (configRoot != null) {
                MakeConfig mc = new MakeConfig(configRoot, parser.getNormalizedDefinition(), properties);
                mc.buildClasses();
                if (properties.dumpTree) {
                    System.out.println("\nTree dump:");
                    DefParser.dumpTree(configRoot, "");
                }
            } else {
                return false;
            }
        }
        return true;
    }
This class generates code for a config class from a given def-file.
configgen/src/main/java/com/yahoo/config/codegen/MakeConfig.java