Package org.opencypher.generator
Class GeneratorFactory<T>
- java.lang.Object
-
- org.opencypher.generator.GeneratorFactory<T>
-
- Direct Known Subclasses:
CypherGeneratorFactory
public abstract class GeneratorFactory<T> extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interfaceGeneratorFactory.Replacement
-
Constructor Summary
Constructors Modifier Constructor Description protectedGeneratorFactory()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected Choiceschoices()Generatorgenerator(Path path, Grammar.ParserOption... options)Generatorgenerator(Grammar grammar)GeneratorgeneratorResource(String resource, Grammar.ParserOption... options)protected abstract TnewContext()Creates a new context object for use by the generator.ProductionReplacement<T>replacement(String production)
-
-
-
Method Detail
-
newContext
protected abstract T newContext()
Creates a new context object for use by the generator. The context object may implementScopeListener- TODO: is this a good design? TODO: should scope notification be part of tree building or string generation? -- An idea: we could make the Scope notion create a nested context object, so new context for new scope...- Returns:
- a new context object for a generator session.
-
generatorResource
public final Generator generatorResource(String resource, Grammar.ParserOption... options) throws ParserConfigurationException, SAXException, IOException
-
generator
public final Generator generator(Path path, Grammar.ParserOption... options) throws IOException, SAXException, ParserConfigurationException
-
choices
protected Choices choices()
-
replacement
public final ProductionReplacement<T> replacement(String production)
-
-