Search in sources :

Example 1 with JavaClassBuilder

use of com.yahoo.config.codegen.JavaClassBuilder in project vespa by vespa-engine.

the class ConfigDefinition method generateClass.

public ConfigDefinitionClass generateClass() {
    File tempDir = Files.createTempDir();
    DefParser parser = new DefParser(name, new StringReader(StringUtilities.implode(defSchema, "\n")));
    JavaClassBuilder builder = new JavaClassBuilder(parser.getTree(), parser.getNormalizedDefinition(), tempDir, null);
    String className = builder.className();
    return new ConfigDefinitionClass(className, builder.javaPackage(), builder.getConfigClass(className));
}
Also used : StringReader(java.io.StringReader) JavaClassBuilder(com.yahoo.config.codegen.JavaClassBuilder) DefParser(com.yahoo.config.codegen.DefParser) File(java.io.File)

Aggregations

DefParser (com.yahoo.config.codegen.DefParser)1 JavaClassBuilder (com.yahoo.config.codegen.JavaClassBuilder)1 File (java.io.File)1 StringReader (java.io.StringReader)1