Interface IHeaderMatcher

All Known Subinterfaces:
ILicense
All Known Implementing Classes:
AbstractHeaderMatcher, AbstractMatcherContainer, AndMatcher, CopyrightMatcher, FullTextMatcher, MatcherRefBuilder.IHeaderMatcherProxy, NotMatcher, OrMatcher, SimpleLicense, SimpleRegexMatcher, SimpleTextMatcher, SPDXMatcherFactory.Match, UnknownLicense

public interface IHeaderMatcher
Performs explicit checks against a line from the header of a file. For implementations that need to check multiple lines the implementation must cache the earlier lines.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    An IHeaderMatcher builder.
  • Method Summary

    Modifier and Type
    Method
    Description
    default Description
    Generates the component Description.
    Get the identifier for this matcher.
    boolean
    matches(IHeaders headers)
    Attempts to match text in the IHeaders instance.
    default void
    Resets this state of this matcher to its initial state in preparation for use with another document scan.
  • Method Details

    • getId

      String getId()
      Get the identifier for this matcher.

      All matchers must have unique identifiers

      Returns:
      the identifier for this matcher.
    • reset

      default void reset()
      Resets this state of this matcher to its initial state in preparation for use with another document scan. In most cases this method does not need to do anything.
    • matches

      boolean matches(IHeaders headers)
      Attempts to match text in the IHeaders instance.
      Parameters:
      headers - the representations of the headers to check
      Returns:
      true if the matcher matches the text, false otherwise.
    • getDescription

      default Description getDescription()
      Generates the component Description.
      Returns:
      the component description.