use of com.tagtraum.perf.gcviewer.model.AbstractGCEvent.ExtendedType in project GCViewer by chewiebug.
the class AbstractDataReaderSun method extractTypeFromParsedString.
protected ExtendedType extractTypeFromParsedString(String typeName) throws UnknownGcTypeException {
ExtendedType extendedType = null;
String lookupTypeName = typeName.endsWith("--") ? typeName.substring(0, typeName.length() - 2) : typeName;
AbstractGCEvent.Type gcType = AbstractGCEvent.Type.lookup(lookupTypeName);
// the gcType may be null because there was a PrintGCCause flag enabled - if so, reparse it with the first paren set stripped
if (gcType == null) {
// try to parse it again with the parens removed
Matcher parenMatcher = parenthesesPattern.matcher(lookupTypeName);
if (parenMatcher.find()) {
gcType = AbstractGCEvent.Type.lookup(parenMatcher.replaceFirst(""));
}
}
if (gcType != null) {
extendedType = ExtendedType.lookup(gcType, typeName);
}
return extendedType;
}
use of com.tagtraum.perf.gcviewer.model.AbstractGCEvent.ExtendedType in project GCViewer by chewiebug.
the class AbstractDataReaderSun method parseType.
protected ExtendedType parseType(String line, ParseInformation pos) throws ParseException {
String typeString = parseTypeString(line, pos);
ExtendedType gcType = extractTypeFromParsedString(typeString);
if (gcType == null) {
throw new UnknownGcTypeException(typeString, line, pos);
}
return gcType;
}
Aggregations