public class GeneratorContextBuilder extends Object
Modifier and Type | Method and Description |
---|---|
GeneratorContextBuilder |
add(Source source)
Adds the provided source to this builder, it will be included in any
subsequently built generator context.
|
GeneratorContext |
buildGeneratorContext()
Returns a newly created
GeneratorContext based on the sources
added to this builder. |
static GeneratorContextBuilder |
newCoreBasedBuilder()
Creates a new
GeneratorContextBuilder that is pre-populated with a
number of basic types provided by
JavaResourceBase.getStandardResources() . |
static GeneratorContextBuilder |
newEmptyBuilder()
Creates a new empty
GeneratorContextBuilder . |
void |
setTreeLogger(TreeLogger treeLogger)
Sets a custom logger on for this generator context.
|
public static GeneratorContextBuilder newCoreBasedBuilder()
GeneratorContextBuilder
that is pre-populated with a
number of basic types provided by
JavaResourceBase.getStandardResources()
.public static GeneratorContextBuilder newEmptyBuilder()
GeneratorContextBuilder
. Note that this
builder does not contain any base java types.public GeneratorContextBuilder add(Source source)
source
- source to be addedpublic GeneratorContext buildGeneratorContext()
GeneratorContext
based on the sources
added to this builder.public void setTreeLogger(TreeLogger treeLogger)
If no custom logger is set, errors will be printed to System.err
.
Copyright © 2018. All rights reserved.