Class RegExpImpl
- java.lang.Object
-
- org.htmlunit.corejs.javascript.regexp.RegExpImpl
-
- All Implemented Interfaces:
RegExpProxy
public class RegExpImpl extends java.lang.Object implements RegExpProxy
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Stringinputprotected SubStringlastMatchprotected SubStringlastParenprotected SubStringleftContextprotected booleanmultilineprotected SubString[]parensprotected SubStringrightContext-
Fields inherited from interface org.htmlunit.corejs.javascript.RegExpProxy
RA_MATCH, RA_REPLACE, RA_REPLACE_ALL, RA_SEARCH
-
-
Constructor Summary
Constructors Constructor Description RegExpImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectaction(Context cx, Scriptable scope, Scriptable thisObj, java.lang.Object[] args, int actionType)java.lang.ObjectcompileRegExp(Context cx, java.lang.String source, java.lang.String flags)private static NativeRegExpcreateRegExp(Context cx, Scriptable scope, java.lang.Object[] args, int optarg, boolean forceFlat)private static voiddo_replace(GlobData rdata, Context cx, RegExpImpl regExpImpl)Analog of do_replace in jsstr.cprivate static intfind_split(Context cx, Scriptable scope, java.lang.String target, java.lang.String separator, int version, RegExpProxy reProxy, Scriptable re, int[] ip, int[] matchlen, boolean[] matched, java.lang.String[][] parensp)intfind_split(Context cx, Scriptable scope, java.lang.String target, java.lang.String separator, Scriptable reObj, int[] ip, int[] matchlen, boolean[] matched, java.lang.String[][] parensp)(package private) SubStringgetParenSubString(int i)Analog of REGEXP_PAREN_SUBSTRING in C jsregexp.h.private static SubStringinterpretDollar(Context cx, RegExpImpl res, java.lang.String da, int dp, int[] skip)booleanisRegExp(Scriptable obj)java.lang.Objectjs_split(Context cx, Scriptable scope, java.lang.String target, java.lang.Object[] args)private static voidmatch_glob(GlobData mdata, Context cx, Scriptable scope, int count, RegExpImpl reImpl)private static java.lang.ObjectmatchOrReplace(Context cx, Scriptable scope, Scriptable thisObj, java.lang.Object[] args, RegExpImpl reImpl, GlobData data, NativeRegExp re)Analog of C match_or_replace.private static voidreplace_glob(GlobData rdata, Context cx, Scriptable scope, RegExpImpl reImpl, int leftIndex, int leftlen)ScriptablewrapRegExp(Context cx, Scriptable scope, java.lang.Object compiled)
-
-
-
Method Detail
-
isRegExp
public boolean isRegExp(Scriptable obj)
- Specified by:
isRegExpin interfaceRegExpProxy
-
compileRegExp
public java.lang.Object compileRegExp(Context cx, java.lang.String source, java.lang.String flags)
- Specified by:
compileRegExpin interfaceRegExpProxy
-
wrapRegExp
public Scriptable wrapRegExp(Context cx, Scriptable scope, java.lang.Object compiled)
- Specified by:
wrapRegExpin interfaceRegExpProxy
-
action
public java.lang.Object action(Context cx, Scriptable scope, Scriptable thisObj, java.lang.Object[] args, int actionType)
- Specified by:
actionin interfaceRegExpProxy
-
createRegExp
private static NativeRegExp createRegExp(Context cx, Scriptable scope, java.lang.Object[] args, int optarg, boolean forceFlat)
-
matchOrReplace
private static java.lang.Object matchOrReplace(Context cx, Scriptable scope, Scriptable thisObj, java.lang.Object[] args, RegExpImpl reImpl, GlobData data, NativeRegExp re)
Analog of C match_or_replace.
-
find_split
public int find_split(Context cx, Scriptable scope, java.lang.String target, java.lang.String separator, Scriptable reObj, int[] ip, int[] matchlen, boolean[] matched, java.lang.String[][] parensp)
- Specified by:
find_splitin interfaceRegExpProxy
-
getParenSubString
SubString getParenSubString(int i)
Analog of REGEXP_PAREN_SUBSTRING in C jsregexp.h. Assumes zero-based; i.e., for $3, i==2
-
match_glob
private static void match_glob(GlobData mdata, Context cx, Scriptable scope, int count, RegExpImpl reImpl)
-
replace_glob
private static void replace_glob(GlobData rdata, Context cx, Scriptable scope, RegExpImpl reImpl, int leftIndex, int leftlen)
-
interpretDollar
private static SubString interpretDollar(Context cx, RegExpImpl res, java.lang.String da, int dp, int[] skip)
-
do_replace
private static void do_replace(GlobData rdata, Context cx, RegExpImpl regExpImpl)
Analog of do_replace in jsstr.c
-
js_split
public java.lang.Object js_split(Context cx, Scriptable scope, java.lang.String target, java.lang.Object[] args)
- Specified by:
js_splitin interfaceRegExpProxy
-
find_split
private static int find_split(Context cx, Scriptable scope, java.lang.String target, java.lang.String separator, int version, RegExpProxy reProxy, Scriptable re, int[] ip, int[] matchlen, boolean[] matched, java.lang.String[][] parensp)
-
-