Class PatternItem


  • public class PatternItem
    extends Object
    • Field Detail

      • source

        public String source
      • target

        public String target
      • enabled

        public boolean enabled
      • description

        public String description
      • severity

        public int severity
      • fromSource

        public boolean fromSource
      • singlePattern

        public boolean singlePattern
    • Constructor Detail

      • PatternItem

        public PatternItem​(String source,
                           String target,
                           boolean enabled,
                           int severity)
      • PatternItem

        public PatternItem​(String source,
                           String target,
                           boolean enabled,
                           int severity,
                           String message)
      • PatternItem

        public PatternItem​(String source,
                           String target,
                           boolean enabled,
                           int severity,
                           boolean fromSource,
                           String message)
    • Method Detail

      • compile

        public void compile()
      • getSourcePattern

        public Pattern getSourcePattern()
      • getTargetPattern

        public Pattern getTargetPattern()
      • getTargetSmartPattern

        public Pattern getTargetSmartPattern​(Matcher srcMatcher)
        Gets the pattern object for the target, automatically compiling a new one if it is null (which means the pattern contains the keyword "" and/or $N).
        Parameters:
        srcMatcher - the source Matcher object (for accessing the captured groups)
        Returns:
        the pattern to use.
      • getSourceSmartPattern

        public Pattern getSourceSmartPattern​(Matcher trgMatcher)
        Gets the pattern object for the source, automatically compiling a new one if it is null (which means the pattern contains the keyword "" and/or $N).
        Parameters:
        trgMatcher - the source Matcher object (for accessing the captured groups)
        Returns:
        the pattern to use.