Class ProgramLoader


  • public class ProgramLoader
    extends java.lang.Object
    Class that loads programs and packages them into a contained type structure.
    • Constructor Summary

      Constructors 
      Constructor Description
      ProgramLoader()
      Constructor with lax and default behavior.
      ProgramLoader​(boolean requireFieldId, boolean requireEnumValue, boolean allowLanguageReservedNames)
      Constructor with specified options.
    • Constructor Detail

      • ProgramLoader

        public ProgramLoader()
        Constructor with lax and default behavior.
      • ProgramLoader

        public ProgramLoader​(boolean requireFieldId,
                             boolean requireEnumValue,
                             boolean allowLanguageReservedNames)
        Constructor with specified options.
        Parameters:
        requireFieldId - If field IDs are required.
        requireEnumValue - If enum values are required.
        allowLanguageReservedNames - If language-reserved names are allowed.
    • Method Detail

      • load

        public ProgramRegistry load​(java.io.File file)
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • load

        public ProgramRegistry load​(java.nio.file.Path file)
                             throws java.io.IOException
        Load a thrift definition from file including all it's dependencies.
        Parameters:
        file - The file to load.
        Returns:
        The loaded contained document.
        Throws:
        java.io.IOException - If the file could not be read or parsed.
      • getGlobalRegistry

        public GlobalRegistry getGlobalRegistry()
        Returns:
        The local registry.