* @param lexer
*/
private void parseStratumSection(Lexer lexer)
throws AbsentInformationException {
if (lexer.lexemType() != Lexer.ASTERISK_S) {
throw new AbsentInformationException(
JDIMessages.SourceDebugExtensionParser_7);
}
if (isAsteriskLexem(lexer.nextLexem())) {
throw new AbsentInformationException(
JDIMessages.SourceDebugExtensionParser_8);
}
String stratumId = getNonAsteriskString(lexer);
if (fDefinedStrata.contains(stratumId)) {
throw new AbsentInformationException(NLS.bind(
JDIMessages.SourceDebugExtensionParser_9,
new String[] { stratumId }));
}
fCurrentStratum = new ReferenceTypeImpl.Stratum(stratumId);
fFileSectionDefinedForCurrentStratum = false;
fLineSectionDefinedForCurrentStratum = false;
int lexemType = lexer.lexemType();
while (lexemType != Lexer.ASTERISK_E && lexemType != Lexer.ASTERISK_S) {
switch (lexemType) {
case Lexer.ASTERISK_F:
if (fFileSectionDefinedForCurrentStratum) {
throw new AbsentInformationException(NLS.bind(
JDIMessages.SourceDebugExtensionParser_10,
new String[] { stratumId }));
}
parseFileSection(lexer);
fFileSectionDefinedForCurrentStratum = true;
break;
case Lexer.ASTERISK_L:
if (fLineSectionDefinedForCurrentStratum) {
throw new AbsentInformationException(NLS.bind(
JDIMessages.SourceDebugExtensionParser_11,
new String[] { stratumId }));
}
parseLineSection(lexer);
fLineSectionDefinedForCurrentStratum = true;
break;
case Lexer.ASTERISK_V:
parseVendorSection(lexer);
break;
case Lexer.ASTERISK_CHAR:
parseFutureSection(lexer);
break;
default:
throw new AbsentInformationException(NLS.bind(
JDIMessages.SourceDebugExtensionParser_12,
new String[] { new String(lexer.lexem()) }));
}
lexemType = lexer.lexemType();
}
if (!fFileSectionDefinedForCurrentStratum) {
throw new AbsentInformationException(NLS.bind(
JDIMessages.SourceDebugExtensionParser_13,
new String[] { stratumId }));
}
if (!fLineSectionDefinedForCurrentStratum) {
throw new AbsentInformationException(NLS.bind(
JDIMessages.SourceDebugExtensionParser_14,
new String[] { stratumId }));
}
fDefinedStrata.add(stratumId);
fReferenceType.addStratum(fCurrentStratum);