Class ProgramConverter
- java.lang.Object
-
- net.morimekta.providence.reflect.util.ProgramConverter
-
public class ProgramConverter extends java.lang.ObjectHelper class that converts a parsed structured thrift model into the contained descriptors used when managing thrift models and descriptors in memory. This is use both in the various providence tools and in the providence generators.
-
-
Constructor Summary
Constructors Constructor Description ProgramConverter(ProgramRegistry programRegistry)Create a program converter that uses the given registry for type references.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CProgramconvert(java.lang.String path, ProgramType program)Convert document model to declared document.
-
-
-
Constructor Detail
-
ProgramConverter
public ProgramConverter(ProgramRegistry programRegistry)
Create a program converter that uses the given registry for type references.- Parameters:
programRegistry- The program registry.
-
-
Method Detail
-
convert
public CProgram convert(java.lang.String path, ProgramType program)
Convert document model to declared document.- Parameters:
path- The program file path.program- Program model to convert.- Returns:
- The declared thrift document.
-
-