- java.lang.Object
-
- com.ibm.dtfj.javacore.parser.j9.SectionParserGrammar
-
- com.ibm.dtfj.javacore.parser.j9.SectionParser
-
- All Implemented Interfaces:
ISectionParser
,ICommonTypes
- Direct Known Subclasses:
ClassLoaderSectionParser
,EnvironmentSectionParser
,MemorySectionParser
,MonitorSectionParser
,NativeMemorySectionParser
,PlatformSectionParser
,StackSectionParser
,ThreadSectionParser
,TitleSectionParser
public abstract class SectionParser extends SectionParserGrammar implements ICommonTypes
-
-
Field Summary
Fields Modifier and Type Field Description protected IImageBuilder
fImageBuilder
protected static 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).-
Fields declared in class com.ibm.dtfj.javacore.parser.j9.SectionParserGrammar
anyMatched, DEFAULT_DEPTH, fLookAheadBuffer, FORCE_THROW, fSectionName, fTagManager, fTagParser
-
Fields declared in interface com.ibm.dtfj.javacore.parser.j9.section.common.ICommonTypes
BUILD_INFO, COMMON, JIT_BUILD_VERSION, JIT_PRESENT, JRE_NAME, JRE_VERSION, NULL, POINTER_SIZE, SECTION, UNAVAILABLE_DATA, VM_VERSION
-
-
Constructor Summary
Constructors Constructor Description SectionParser(String sectionName)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
addAsProperty(Properties properties, String key, String value)
void
readIntoDTFJ(ILookAheadBuffer lookAheadBuffer, IImageBuilder imageBuilder)
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.protected abstract void
sovOnlyRules(String startingTag)
protected abstract void
topLevelRule()
Must be implemented by subclass.-
Methods declared in class com.ibm.dtfj.javacore.parser.j9.SectionParserGrammar
consume, getCurrentFileLineNumber, getErrors, getLineRuleResults, getLookAheadBuffer, handleError, handleError, handleError, handleError, handleError, handleErrorAtLineNumber, handleRequiredMismatch, handleUnknownMismatch, isValidJavaCoreTag, isValidSectionTag, lookAhead, match, matchOptional, matchRequired, processTagLineOptional, processTagLineRequired, setLookAheadBuffer, setLookAheadBuffer, setTagManager
-
Methods declared in class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods declared in interface com.ibm.dtfj.javacore.parser.framework.parser.ISectionParser
anyMatched, getSectionName
-
-
-
-
Field Detail
-
fImageBuilder
protected IImageBuilder fImageBuilder
-
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 interfaceISectionParser
- Parameters:
lookahead
- from where to read tokenstag
- 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
-
sovOnlyRules
protected abstract void sovOnlyRules(String startingTag) throws ParserException
- Parameters:
startingTag
-- Throws:
ParserException
-
-