|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoscript.data.Value
oscript.data.OObject
oscript.data.RegExp
A regular expression object.
Nested Class Summary | |
protected static interface |
RegExp.RegExpFactory
Interface to be implemented by regular-expression factory |
Field Summary | |
static java.lang.String[] |
MEMBER_NAMES
|
static java.lang.String |
PARENT_TYPE_NAME
The type object for an instance of RegExp... |
static java.lang.String |
TYPE_NAME
|
Fields inherited from class oscript.data.OObject |
EMPTY_EXPR_LIST_EVALUATOR, TYPE |
Fields inherited from class oscript.data.Value |
DEBUG, NULL, UNDEFINED |
Constructor Summary | |
protected |
RegExp(Value exp,
Value flags)
Class Constructor. |
Method Summary | |
java.lang.String |
castToString()
Convert this object to a native java String value. |
static RegExp |
createRegExp(Value ostr)
Create a regular expression. |
abstract RegExpResult |
exec(Value str)
Execute the search for a match against a string. |
protected Value |
getTypeImpl()
Get the type of this object. |
static void |
register(RegExp.RegExpFactory factory)
Used by implementations of RegExp to register themselves as being able to implement RegExp. |
boolean |
test(Value str)
Executes the search for a match between a regular expression and a specified string. |
Methods inherited from class oscript.data.OObject |
getMember, populateMemberSet |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String PARENT_TYPE_NAME
BuiltinType
:
public final static Value TYPE = BuiltinType.makeBuiltinType("oscript.data.???RegExp"); public final static String PARENT_TYPE_NAME = RegExp.PARENT_TYPE_NAME; public final static String TYPE_NAME = RegExp.TYPE_NAME; public final static String[] MEMBER_NAMES = RegExp.MEMBER_NAMES;
public static final java.lang.String TYPE_NAME
public static final java.lang.String[] MEMBER_NAMES
Constructor Detail |
protected RegExp(Value exp, Value flags)
Method Detail |
public static void register(RegExp.RegExpFactory factory)
RegExp
which is set to the value returned by factory's
RegExp.RegExpFactory.getType()
method.
factory
- the factory that can construct a regular
expression objectpublic static RegExp createRegExp(Value ostr)
protected Value getTypeImpl()
Value.getType()
.
getTypeImpl
in class OObject
public abstract RegExpResult exec(Value str)
Note that this API is modeled after the JavaScript RegExp API, for the benefit of users already familiar with JavaScript.
str
- the string to match
public boolean test(Value str)
str
- the string to match
true
if match was foundpublic java.lang.String castToString() throws PackagedScriptObjectException
String
value.
castToString
in class OObject
PackagedObjectException(NoSuchMethodException)
PackagedScriptObjectException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |