Class ReferencePointMatcher


  • public class ReferencePointMatcher
    extends Object
    A tag may initialize this ReferencePointMatcher with its reference points. Then, the matcher will be invoked for each child tag via ::Match, and eventually it will be invoked upon exiting the parent tag.
    Author:
    nhant01, GeorgeLuo
    • Method Detail

      • exitParentTag

        public void exitParentTag​(@Nonnull
                                  Context context,
                                  @Nonnull
                                  dev.amp.validator.ValidatorProtos.ValidationResult.Builder result)
                           throws TagValidationException
        This method gets invoked when we're done with processing all the child tags, so now we can determine whether any reference points remain unsatisfied or duplicate.
        Parameters:
        context - the Context.
        result - the ValidationResult.
        Throws:
        TagValidationException - the TagValidationException.
      • cleanup

        public void cleanup()
        Clean up reference, improve gc performance.
      • getLineCol

        public Locator getLineCol()
        Returns a pair of line/col.
        Returns:
        returns a pair of line/col.
      • recordMatch

        public void recordMatch​(@Nonnull
                                ParsedTagSpec parsedTagSpec)
        Record the parsed tag spec id.
        Parameters:
        parsedTagSpec - the ParsedTagSpec.