Class RegexParser

  • All Implemented Interfaces:
    org.springframework.beans.factory.InitializingBean

    public class RegexParser
    extends java.lang.Object
    implements org.springframework.beans.factory.InitializingBean
    Parser operating on a configured regular expression to return a matching part or null.
    • Constructor Summary

      Constructors 
      Constructor Description
      RegexParser()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterPropertiesSet()  
      protected java.lang.String getRegex()  
      java.lang.String parse​(java.lang.String value)
      Parse the value and return the matched part or null
      java.lang.String parse​(java.lang.String value, int group)
      Parse the value and return the matched group or null
      void setRegex​(java.lang.String regex)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RegexParser

        public RegexParser()
    • Method Detail

      • afterPropertiesSet

        public void afterPropertiesSet()
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      • parse

        public java.lang.String parse​(java.lang.String value)
        Parse the value and return the matched part or null
        Parameters:
        value -
        Returns:
        matched part or null
      • parse

        public java.lang.String parse​(java.lang.String value,
                                      int group)
        Parse the value and return the matched group or null
        Parameters:
        value -
        group -
        Returns:
        matched group or null
      • setRegex

        public void setRegex​(java.lang.String regex)
        Parameters:
        regex - the regex to set
      • getRegex

        protected java.lang.String getRegex()
        Returns:
        the regex