Module openj9.dtfj

Class TagParser

java.lang.Object
com.ibm.dtfj.javacore.parser.framework.tag.TagParser
All Implemented Interfaces:
ITagParser
Direct Known Subclasses:
ClassLoaderTagParser, CommonTagParser, EnvironmentTagParser, MemoryTagParser, MonitorTagParser, NativeMemoryTagParser, PlatformTagParser, StackTagParser, ThreadTagParser, TitleTagParser

public abstract class TagParser extends Object implements ITagParser
  • Constructor Details

    • TagParser

      public TagParser(String sectionName)
  • Method Details

    • initTagAttributeRules

      protected abstract void initTagAttributeRules()
      Must be implemented by the caller. Should not be called, just implemented.
      Typically contains a series of addTag(String, ILineRule) calls. Parent class knows where to call this method.

      General guidelines:

      For tags that contain attributes with meaningful values:
      Specify line rules with patterns that are of interest:
      1. patterns that precedes a value (e.g., a ":", "=", etc..);
      2. patterns that match a value;
      If an attribute value in a line rule pertaining to some tag has more than one possible pattern (e.g., "info" = (Class.java:23) or "info" = (Native Method) ), list all of the patterns for that value in its corresponding line rule. If the first doesn't match, nothing happens, so the line rule will check the next pattern until a match occurs.
      Any other pattern occurring in the source string will be ignored.


      For tags with no attributes, or meaningful values:
      Specify null for line rules.
    • addTag

      protected void addTag(String tag, ILineRule lineRule)
      If a Line rule is missing a pattern list, an exception will be thrown indicating so, and the line rule will not be added.
      Parameters:
      tag -
      rule -
    • getLineRule

      public ILineRule getLineRule(String tag)
      Specified by:
      getLineRule in interface ITagParser
    • getSectionName

      public String getSectionName()
      Specified by:
      getSectionName in interface ITagParser
    • hasTag

      public boolean hasTag(String tag)
      Specified by:
      hasTag in interface ITagParser
    • getTags

      public Iterator getTags()
      Specified by:
      getTags in interface ITagParser