public class TypeLoader extends Object
| Modifier | Constructor and Description |
|---|---|
|
TypeLoader(Collection<File> includes,
DocumentParser parser)
Construct a type loader for file types matches with the given parser.
|
protected |
TypeLoader(Collection<File> includes,
DocumentParser parser,
DocumentRegistry registry,
DocumentConverter converter)
Constructor with injected functionality.
|
| Modifier and Type | Method and Description |
|---|---|
DocumentRegistry |
getRegistry() |
CDocument |
load(File file)
Load a thrift definition from file including all it's dependencies.
|
Collection<net.morimekta.providence.model.ThriftDocument> |
loadedDocuments() |
public TypeLoader(Collection<File> includes, DocumentParser 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, DocumentParser parser, DocumentRegistry registry, DocumentConverter 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<net.morimekta.providence.model.ThriftDocument> loadedDocuments()
public CDocument load(File file) throws IOException, ParseException
file - The file to load.IOException - If the file could not be read.ParseException - If the file could not be parsed.public DocumentRegistry getRegistry()
Copyright © 2015–2016 morimekta.net. All rights reserved.