Class CBSchemaCompilerFactory
java.lang.Object
com.io7m.cedarbridge.schema.compiler.CBSchemaCompilerFactory
- All Implemented Interfaces:
CBSchemaCompilerFactoryType
A factory of schema compilers.
-
Constructor Summary
ConstructorsConstructorDescriptionA factory of schema compilers.CBSchemaCompilerFactory(CBExpressionSourceFactoryType inSources, CBParserFactoryType inParsers, CBBinderFactoryType inBinders, CBTypeCheckerFactoryType inTypers) A factory of schema compilers. -
Method Summary
Modifier and TypeMethodDescriptioncreateCompiler(CBSchemaCompilerConfiguration configuration) Create a compiler for the given configuration.createCompiler(CBSchemaCompilerConfiguration configuration, Consumer<CBError> errorConsumer) Create a compiler for the given configuration.
-
Constructor Details
-
CBSchemaCompilerFactory
public CBSchemaCompilerFactory()A factory of schema compilers. Dependencies are loaded from ServiceLoader. -
CBSchemaCompilerFactory
public CBSchemaCompilerFactory(CBExpressionSourceFactoryType inSources, CBParserFactoryType inParsers, CBBinderFactoryType inBinders, CBTypeCheckerFactoryType inTypers) A factory of schema compilers.- Parameters:
inBinders- A source of bindersinParsers- A source of parsersinSources- A source of expression sourcesinTypers- A source of type checkers
-
-
Method Details
-
createCompiler
Description copied from interface:CBSchemaCompilerFactoryTypeCreate a compiler for the given configuration.- Specified by:
createCompilerin interfaceCBSchemaCompilerFactoryType- Parameters:
configuration- The compiler configuration- Returns:
- A new compiler
-
createCompiler
public CBSchemaCompilerType createCompiler(CBSchemaCompilerConfiguration configuration, Consumer<CBError> errorConsumer) Description copied from interface:CBSchemaCompilerFactoryTypeCreate a compiler for the given configuration.- Specified by:
createCompilerin interfaceCBSchemaCompilerFactoryType- Parameters:
configuration- The compiler configurationerrorConsumer- An error consumer function- Returns:
- A new compiler
-