Module openj9.dtfj

Class SectionParser

    • Field Detail

      • LOOKAHEAD_DEPTH

        protected static final int LOOKAHEAD_DEPTH
        Depth of at least 3 is needed for J9 javacores, as parsing a section from the start will yield three tokens: SECTION, header information token, first TAG of section (note that NULL lines are ignored by the scanner). Adjust as necessary for deeper analysis.
        See Also:
        Constant Field Values
    • Constructor Detail

      • SectionParser

        public SectionParser​(String sectionName)
    • Method Detail

      • readIntoDTFJ

        public void readIntoDTFJ​(ILookAheadBuffer lookAheadBuffer,
                                 IImageBuilder imageBuilder)
                          throws ParserException
        Description copied from interface: ISectionParser
        Pass in a lookahead buffer that is shared amongst all section parsers, pass in the DTFJ factory to construct the DTFJ objects as tags are being parsed.
        Specified by:
        readIntoDTFJ in interface ISectionParser
        Parameters:
        lookahead - from where to read tokens
        tag - information containing current tag information at the time of the parse
        Throws:
        NullPointerException - if a null lookaheadbuffer is passed.
        ParserException
      • addAsProperty

        public boolean addAsProperty​(Properties properties,
                                     String key,
                                     String value)
        Parameters:
        properties -
        key -
        value -
      • topLevelRule

        protected abstract void topLevelRule()
                                      throws ParserException
        Must be implemented by subclass.
        Parameters:
        lookAheadBuffer -
        Throws:
        ParserException