Class HtmlUnitRegExpProxy
java.lang.Object
org.htmlunit.corejs.javascript.regexp.RegExpImpl
org.htmlunit.javascript.regexp.HtmlUnitRegExpProxy
- All Implemented Interfaces:
org.htmlunit.corejs.javascript.RegExpProxy
public class HtmlUnitRegExpProxy
extends org.htmlunit.corejs.javascript.regexp.RegExpImpl
Begins customization of JavaScript RegExp base on JDK regular expression support.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static classprivate static final classSimple helper. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.apache.commons.logging.LogPattern cacheprivate final org.htmlunit.corejs.javascript.RegExpProxyFields inherited from class org.htmlunit.corejs.javascript.regexp.RegExpImpl
input, lastMatch, lastParen, leftContext, multiline, parens, rightContextFields inherited from interface org.htmlunit.corejs.javascript.RegExpProxy
RA_MATCH, RA_REPLACE, RA_REPLACE_ALL, RA_SEARCH -
Constructor Summary
ConstructorsConstructorDescriptionHtmlUnitRegExpProxy(org.htmlunit.corejs.javascript.RegExpProxy wrapped) Wraps a proxy to enhance it. -
Method Summary
Modifier and TypeMethodDescriptionaction(org.htmlunit.corejs.javascript.Context cx, org.htmlunit.corejs.javascript.Scriptable scope, org.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args, int actionType) Use the wrapped proxy except for replacement with string arg where it uses Java regular expression.compileRegExp(org.htmlunit.corejs.javascript.Context cx, String source, String flags) (package private) StringcomputeReplacementValue(String replacement, String originalString, MatchResult matcher, boolean group0ReturnsWholeMatch) private ObjectdoAction(org.htmlunit.corejs.javascript.Context cx, org.htmlunit.corejs.javascript.Scriptable scope, org.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args, int actionType) private StringdoReplacement(String originalString, String replacement, Matcher matcher, boolean replaceAll) private StringdoStringReplacement(String originalString, String searchString, String replacement, boolean replaceAll) intfind_split(org.htmlunit.corejs.javascript.Context cx, org.htmlunit.corejs.javascript.Scriptable scope, String target, String separator, org.htmlunit.corejs.javascript.Scriptable re, int[] ip, int[] matchlen, boolean[] matched, String[][] parensp) booleanisRegExp(org.htmlunit.corejs.javascript.Scriptable obj) (package private) static StringTransform a JavaScript regular expression to a Java regular expressionprivate voidsetProperties(Matcher matcher, String thisString, int startPos, int endPos) private ObjectwrappedAction(org.htmlunit.corejs.javascript.Context cx, org.htmlunit.corejs.javascript.Scriptable scope, org.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args, int actionType) Calls action on the wrapped RegExp proxy.org.htmlunit.corejs.javascript.ScriptablewrapRegExp(org.htmlunit.corejs.javascript.Context cx, org.htmlunit.corejs.javascript.Scriptable scope, Object compiled) Methods inherited from class org.htmlunit.corejs.javascript.regexp.RegExpImpl
js_split
-
Field Details
-
LOG
private static final org.apache.commons.logging.Log LOG -
PATTENS
-
wrapped_
private final org.htmlunit.corejs.javascript.RegExpProxy wrapped_
-
-
Constructor Details
-
HtmlUnitRegExpProxy
public HtmlUnitRegExpProxy(org.htmlunit.corejs.javascript.RegExpProxy wrapped) Wraps a proxy to enhance it.- Parameters:
wrapped- the original proxy
-
-
Method Details
-
action
public Object action(org.htmlunit.corejs.javascript.Context cx, org.htmlunit.corejs.javascript.Scriptable scope, org.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args, int actionType) Use the wrapped proxy except for replacement with string arg where it uses Java regular expression.- Specified by:
actionin interfaceorg.htmlunit.corejs.javascript.RegExpProxy- Overrides:
actionin classorg.htmlunit.corejs.javascript.regexp.RegExpImpl
-
doAction
-
doStringReplacement
-
doReplacement
-
computeReplacementValue
String computeReplacementValue(String replacement, String originalString, MatchResult matcher, boolean group0ReturnsWholeMatch) -
wrappedAction
-
setProperties
-
compileRegExp
-
find_split
public int find_split(org.htmlunit.corejs.javascript.Context cx, org.htmlunit.corejs.javascript.Scriptable scope, String target, String separator, org.htmlunit.corejs.javascript.Scriptable re, int[] ip, int[] matchlen, boolean[] matched, String[][] parensp) - Specified by:
find_splitin interfaceorg.htmlunit.corejs.javascript.RegExpProxy- Overrides:
find_splitin classorg.htmlunit.corejs.javascript.regexp.RegExpImpl
-
isRegExp
public boolean isRegExp(org.htmlunit.corejs.javascript.Scriptable obj) - Specified by:
isRegExpin interfaceorg.htmlunit.corejs.javascript.RegExpProxy- Overrides:
isRegExpin classorg.htmlunit.corejs.javascript.regexp.RegExpImpl
-
wrapRegExp
public org.htmlunit.corejs.javascript.Scriptable wrapRegExp(org.htmlunit.corejs.javascript.Context cx, org.htmlunit.corejs.javascript.Scriptable scope, Object compiled) - Specified by:
wrapRegExpin interfaceorg.htmlunit.corejs.javascript.RegExpProxy- Overrides:
wrapRegExpin classorg.htmlunit.corejs.javascript.regexp.RegExpImpl
-
jsRegExpToJavaRegExp
-