Class RegExpImpl
java.lang.Object
org.mozilla.javascript.regexp.RegExpImpl
- All Implemented Interfaces:
RegExpProxy
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
protected SubString
protected SubString
protected SubString
protected boolean
protected SubString[]
protected SubString
Fields inherited from interface RegExpProxy
RA_MATCH, RA_REPLACE, RA_SEARCH
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaction
(Context cx, Scriptable scope, Scriptable thisObj, Object[] args, int actionType) compileRegExp
(Context cx, String source, String flags) private static NativeRegExp
createRegExp
(Context cx, Scriptable scope, Object[] args, int optarg, boolean forceFlat) private static void
do_replace
(GlobData rdata, Context cx, RegExpImpl regExpImpl) Analog of do_replace in jsstr.cprivate static int
find_split
(Context cx, Scriptable scope, String target, String separator, int version, RegExpProxy reProxy, Scriptable re, int[] ip, int[] matchlen, boolean[] matched, String[][] parensp) int
find_split
(Context cx, Scriptable scope, String target, String separator, Scriptable reObj, int[] ip, int[] matchlen, boolean[] matched, String[][] parensp) (package private) SubString
getParenSubString
(int i) Analog of REGEXP_PAREN_SUBSTRING in C jsregexp.h.private static SubString
interpretDollar
(Context cx, RegExpImpl res, String da, int dp, int[] skip) boolean
isRegExp
(Scriptable obj) js_split
(Context cx, Scriptable scope, String target, Object[] args) private static void
match_glob
(GlobData mdata, Context cx, Scriptable scope, int count, RegExpImpl reImpl) private static Object
matchOrReplace
(Context cx, Scriptable scope, Scriptable thisObj, Object[] args, RegExpImpl reImpl, GlobData data, NativeRegExp re) Analog of C match_or_replace.private static void
replace_glob
(GlobData rdata, Context cx, Scriptable scope, RegExpImpl reImpl, int leftIndex, int leftlen) wrapRegExp
(Context cx, Scriptable scope, Object compiled)
-
Field Details
-
input
-
multiline
protected boolean multiline -
parens
-
lastMatch
-
lastParen
-
leftContext
-
rightContext
-
-
Constructor Details
-
RegExpImpl
public RegExpImpl()
-
-
Method Details
-
isRegExp
- Specified by:
isRegExp
in interfaceRegExpProxy
-
compileRegExp
- Specified by:
compileRegExp
in interfaceRegExpProxy
-
wrapRegExp
- Specified by:
wrapRegExp
in interfaceRegExpProxy
-
action
public Object action(Context cx, Scriptable scope, Scriptable thisObj, Object[] args, int actionType) - Specified by:
action
in interfaceRegExpProxy
-
createRegExp
private static NativeRegExp createRegExp(Context cx, Scriptable scope, Object[] args, int optarg, boolean forceFlat) -
matchOrReplace
private static Object matchOrReplace(Context cx, Scriptable scope, Scriptable thisObj, Object[] args, RegExpImpl reImpl, GlobData data, NativeRegExp re) Analog of C match_or_replace. -
find_split
public int find_split(Context cx, Scriptable scope, String target, String separator, Scriptable reObj, int[] ip, int[] matchlen, boolean[] matched, String[][] parensp) - Specified by:
find_split
in interfaceRegExpProxy
-
getParenSubString
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
-
do_replace
Analog of do_replace in jsstr.c -
js_split
- Specified by:
js_split
in interfaceRegExpProxy
-
find_split
private static int find_split(Context cx, Scriptable scope, String target, String separator, int version, RegExpProxy reProxy, Scriptable re, int[] ip, int[] matchlen, boolean[] matched, String[][] parensp)
-