Class ThriftProgramParser

  • All Implemented Interfaces:
    ProgramParser

    public class ThriftProgramParser
    extends java.lang.Object
    implements ProgramParser
    Since:
    07.09.15
    Author:
    Stein Eldar Johnsen
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      net.morimekta.providence.model.ProgramType parse​(java.io.InputStream in, java.io.File file, java.util.Collection<java.io.File> includeDirs)
      Parse input stream to document declaration model.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • VALID_NAMESPACE

        public static final java.util.regex.Pattern VALID_NAMESPACE
      • VALID_SDI_NAMESPACE

        public static final java.util.regex.Pattern VALID_SDI_NAMESPACE
    • Constructor Detail

      • ThriftProgramParser

        public ThriftProgramParser()
      • ThriftProgramParser

        public ThriftProgramParser​(boolean requireFieldId,
                                   boolean requireEnumValue)
      • ThriftProgramParser

        public ThriftProgramParser​(boolean requireFieldId,
                                   boolean requireEnumValue,
                                   boolean allowLanguageReservedNames)
    • Method Detail

      • parse

        public net.morimekta.providence.model.ProgramType parse​(java.io.InputStream in,
                                                                java.io.File file,
                                                                java.util.Collection<java.io.File> includeDirs)
                                                         throws java.io.IOException
        Description copied from interface: ProgramParser
        Parse input stream to document declaration model.
        Specified by:
        parse in interface ProgramParser
        Parameters:
        in - The stream to parse.
        file - The file that is being parsed.
        includeDirs - Included directories that can be referenced directly.
        Returns:
        The declared document model.
        Throws:
        java.io.IOException - When the stream was unreadable.
        ParseException - When the document could not be parsed.