Package org.ocpsoft.rewrite.param
Class RegexParameterizedPatternParser
java.lang.Object
org.ocpsoft.rewrite.param.RegexParameterizedPatternParser
- All Implemented Interfaces:
Parameterized,ParameterizedPattern,ParameterizedPatternParser
An
Parameterized regular expression Pattern.- Author:
- Lincoln Baxter, III
-
Constructor Summary
ConstructorsConstructorDescriptionRegexParameterizedPatternParser(String pattern) Create a newRegexParameterizedPatternParserinstance with the defaultorg.ocpsoft.rewrite.bind.parse.CaptureType#BRACEand parameter pattern of ".*".RegexParameterizedPatternParser(String parameterPattern, String pattern) Create a newRegexParameterizedPatternParserinstance with the defaultParseTools.CaptureType.BRACE.RegexParameterizedPatternParser(ParseTools.CaptureType type, String pattern) Create a newRegexParameterizedPatternParserinstance with the default parameter regex of ".*".RegexParameterizedPatternParser(ParseTools.CaptureType type, String defaultParameterPattern, String pattern) Create a newRegexParameterizedPatternParserinstance. -
Method Summary
Modifier and TypeMethodDescriptionReturn theParameterizedPatternBuildercorresponding to the pattern with which thisParameterizedPatternParserwas constructed.getCompiledPattern(ParameterStore store) protected static List<org.ocpsoft.rewrite.param.RegexParameterizedPatternParser.RegexGroup>getGroups(ParseTools.CaptureType type, char[] chars) Get the pattern for which thisParameterizedPatternrepresents.Get all requiredParameternames for thisParameterizedinstance.Return aParameterizedPatternResultfor the evaluation of thisParameterizedPatternagainst the givenString.voidsetParameterStore(ParameterStore store) Initialize thisParameterizedinstance with the globalParameterStore.toString()
-
Constructor Details
-
RegexParameterizedPatternParser
Create a newRegexParameterizedPatternParserinstance with the defaultorg.ocpsoft.rewrite.bind.parse.CaptureType#BRACEand parameter pattern of ".*". -
RegexParameterizedPatternParser
Create a newRegexParameterizedPatternParserinstance with the defaultParseTools.CaptureType.BRACE. -
RegexParameterizedPatternParser
Create a newRegexParameterizedPatternParserinstance with the default parameter regex of ".*". -
RegexParameterizedPatternParser
public RegexParameterizedPatternParser(ParseTools.CaptureType type, String defaultParameterPattern, String pattern) Create a newRegexParameterizedPatternParserinstance.
-
-
Method Details
-
getGroups
protected static List<org.ocpsoft.rewrite.param.RegexParameterizedPatternParser.RegexGroup> getGroups(ParseTools.CaptureType type, char[] chars) -
parse
Description copied from interface:ParameterizedPatternParserReturn aParameterizedPatternResultfor the evaluation of thisParameterizedPatternagainst the givenString.- Specified by:
parsein interfaceParameterizedPatternParser
-
getCompiledPattern
-
toString
-
getPattern
Description copied from interface:ParameterizedPatternGet the pattern for which thisParameterizedPatternrepresents.- Specified by:
getPatternin interfaceParameterizedPattern
-
getBuilder
Description copied from interface:ParameterizedPatternParserReturn theParameterizedPatternBuildercorresponding to the pattern with which thisParameterizedPatternParserwas constructed.- Specified by:
getBuilderin interfaceParameterizedPatternParser
-
getRequiredParameterNames
Description copied from interface:ParameterizedGet all requiredParameternames for thisParameterizedinstance.- Specified by:
getRequiredParameterNamesin interfaceParameterized
-
setParameterStore
Description copied from interface:ParameterizedInitialize thisParameterizedinstance with the globalParameterStore.- Specified by:
setParameterStorein interfaceParameterized
-