Class RegexParser
- java.lang.Object
-
- de.hybris.platform.acceleratorservices.util.RegexParser
-
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
public class RegexParser extends java.lang.Object implements org.springframework.beans.factory.InitializingBeanParser 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 voidafterPropertiesSet()protected java.lang.StringgetRegex()java.lang.Stringparse(java.lang.String value)Parse the value and return the matched part or nulljava.lang.Stringparse(java.lang.String value, int group)Parse the value and return the matched group or nullvoidsetRegex(java.lang.String regex)
-
-
-
Method Detail
-
afterPropertiesSet
public void afterPropertiesSet()
- Specified by:
afterPropertiesSetin interfaceorg.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
-
-