public class TypeLoader extends Object
| Modifier | Constructor and Description |
|---|---|
|
TypeLoader(Collection<File> includes)
Construct a type loader for file types matches with the given parser.
|
|
TypeLoader(Collection<File> includes,
ProgramParser parser)
Construct a type loader for file types matches with the given parser.
|
protected |
TypeLoader(Collection<File> includes,
ProgramParser parser,
ProgramRegistry registry,
ProgramConverter converter)
Constructor with injected functionality.
|
| Modifier and Type | Method and Description |
|---|---|
ProgramRegistry |
getProgramRegistry() |
ProgramTypeRegistry |
load(File file)
Load a thrift definition from file including all it's dependencies.
|
Collection<ProgramType> |
loadedPrograms() |
public TypeLoader(Collection<File> includes)
includes - List of files with include path roots. For includes
search these in order.public TypeLoader(Collection<File> includes, ProgramParser parser)
includes - List of files with include path roots. For includes
search these in order.parser - The thrift file parser.protected TypeLoader(Collection<File> includes, ProgramParser parser, ProgramRegistry registry, ProgramConverter converter)
includes - List of files with include path roots. For includes
search these in order.parser - The thrift file parser.registry - The type registry.converter - The document converterpublic Collection<ProgramType> loadedPrograms()
public ProgramTypeRegistry load(File file) throws IOException
file - The file to load.IOException - If the file could not be read or parsed.public ProgramRegistry getProgramRegistry()
Copyright © 2015–2017 morimekta.net. All rights reserved.