public class RubyRegexp extends RubyObject implements ReOptions, EncodingCapable, MarshalEncoding
RubyObject.Data
RubyBasicObject.Finalizer
Modifier and Type | Field and Description |
---|---|
static int |
ARG_ENCODING_FIXED |
static int |
ARG_ENCODING_NONE |
FIELD_ALLOCATED_CLASSES, FIELD_ALLOCATORS, IVAR_INSPECTING_OBJECT_ALLOCATOR, OBJECT_ALLOCATOR, OBJECT_VAR0_ALLOCATOR, OBJECT_VAR1_ALLOCATOR, OBJECT_VAR2_ALLOCATOR, OBJECT_VAR3_ALLOCATOR, OBJECT_VAR4_ALLOCATOR, OBJECT_VAR5_ALLOCATOR, OBJECT_VAR6_ALLOCATOR, OBJECT_VAR7_ALLOCATOR, OBJECT_VAR8_ALLOCATOR, OBJECT_VAR9_ALLOCATOR, REIFYING_OBJECT_ALLOCATOR
ALL_F, BASICOBJECT_ALLOCATOR, COMPARE_BY_IDENTITY_F, ERR_INSECURE_SET_INST_VAR, FALSE_F, FL_USHIFT, flags, FROZEN_F, IS_OVERLAID_F, metaClass, NEVER, NIL_F, REFINED_MODULE_F, STAMP_OFFSET, TAINTED_F, UNDEF, UNTRUST_F, USER0_F, USER1_F, USER2_F, USER3_F, USER4_F, USER5_F, USER6_F, USER7_F, USER8_F, USER9_F, USERA_F, VAR_TABLE_OFFSET, varTable, varTableStamp
RE_DEFAULT, RE_FIXED, RE_LITERAL, RE_MAY_IGNORECASE, RE_NONE, RE_OPTION_EXTENDED, RE_OPTION_IGNORECASE, RE_OPTION_LONGEST, RE_OPTION_MULTILINE, RE_OPTION_NONE, RE_OPTION_ONCE, RE_OPTION_POSIXLINE, RE_OPTION_SINGLELINE, RE_UNICODE
NULL_ARRAY
Modifier and Type | Method and Description |
---|---|
IRubyObject |
casefold_p(ThreadContext context) |
void |
clearEncodingNone() |
void |
clearLiteral() |
static RubyClass |
createRegexpClass(Ruby runtime) |
IRubyObject |
encoding(ThreadContext context) |
IRubyObject |
eqq(ThreadContext context,
IRubyObject arg)
rb_reg_eqq
|
IRubyObject |
eqq19(ThreadContext context,
IRubyObject arg) |
IRubyObject |
fixed_encoding_p(ThreadContext context) |
org.jcodings.Encoding |
getEncoding() |
KCode |
getKCode() |
org.jcodings.Encoding |
getMarshalEncoding() |
String[] |
getNames() |
ClassIndex |
getNativeClassIndex()
This is overridden in the other concrete Java builtins to provide a fast way
to determine what type they are.
|
RegexpOptions |
getOptions()
rb_reg_options
|
org.joni.Regex |
getPattern() |
RubyFixnum |
hash()
rb_obj_id
Will return the hash code of this object.
|
IRubyObject |
initialize_copy(IRubyObject re)
rb_reg_init_copy
|
IRubyObject |
initialize_m(IRubyObject arg) |
IRubyObject |
initialize_m(IRubyObject arg0,
IRubyObject arg1) |
IRubyObject |
initialize_m(IRubyObject arg0,
IRubyObject arg1,
IRubyObject arg2) |
IRubyObject |
initialize_m19(IRubyObject arg) |
IRubyObject |
initialize_m19(IRubyObject arg0,
IRubyObject arg1) |
IRubyObject |
initialize_m19(IRubyObject arg0,
IRubyObject arg1,
IRubyObject arg2) |
IRubyObject |
inspect()
rb_reg_inspect
|
IRubyObject |
inspect19() |
boolean |
isEncodingNone() |
boolean |
isKCodeDefault() |
boolean |
isLiteral() |
static IRubyObject |
last_match_s(ThreadContext context,
IRubyObject recv)
rb_reg_s_last_match / match_getter
|
static IRubyObject |
last_match_s(ThreadContext context,
IRubyObject recv,
IRubyObject nth)
rb_reg_s_last_match
|
static IRubyObject |
last_match(IRubyObject match)
rb_reg_last_match
|
static void |
marshalTo(RubyRegexp regexp,
MarshalStream output) |
static IRubyObject |
match_last(IRubyObject match)
rb_reg_match_last
|
IRubyObject |
match_m(ThreadContext context,
IRubyObject str)
rb_reg_match_m
|
IRubyObject |
match_m19(ThreadContext context,
IRubyObject str,
Block block) |
IRubyObject |
match_m19(ThreadContext context,
IRubyObject str,
boolean useBackref,
Block block) |
IRubyObject |
match_m19(ThreadContext context,
IRubyObject str,
IRubyObject pos,
Block block) |
static IRubyObject |
match_post(IRubyObject match)
rb_reg_match_post
|
static IRubyObject |
match_pre(IRubyObject match)
rb_reg_match_pre
|
static int |
matcherMatch(Ruby runtime,
org.joni.Matcher matcher,
int start,
int range,
int option) |
static int |
matcherSearch(Ruby runtime,
org.joni.Matcher matcher,
int start,
int range,
int option) |
IRubyObject |
named_captures(ThreadContext context)
rb_reg_named_captures
|
IRubyObject |
names(ThreadContext context)
rb_reg_names
|
static RubyRegexp |
newDRegexp(Ruby runtime,
RubyString pattern,
int joniOptions) |
static RubyRegexp |
newDRegexp(Ruby runtime,
RubyString pattern,
RegexpOptions options) |
static RubyRegexp |
newDRegexpEmbedded(Ruby runtime,
RubyString pattern,
int embeddedOptions) |
static RubyRegexp |
newDRegexpEmbedded19(Ruby runtime,
IRubyObject[] strings,
int embeddedOptions) |
static RubyRegexp |
newRegexp(Ruby runtime,
org.jruby.util.ByteList pattern) |
static RubyRegexp |
newRegexp(Ruby runtime,
org.jruby.util.ByteList pattern,
int options) |
static RubyRegexp |
newRegexp(Ruby runtime,
org.jruby.util.ByteList pattern,
RegexpOptions options) |
static RubyRegexp |
newRegexp(Ruby runtime,
String pattern,
RegexpOptions options) |
static RubyRegexp |
newRegexpFromStr(Ruby runtime,
RubyString s,
int options) |
static IRubyObject |
nth_match(int nth,
IRubyObject match)
rb_reg_nth_match
|
IRubyObject |
op_equal(ThreadContext context,
IRubyObject other) |
IRubyObject |
op_match(ThreadContext context,
IRubyObject arg)
rb_obj_pattern_match
call-seq:
obj =~ other => false
Pattern Match---Overridden by descendents (notably
Regexp and String ) to provide meaningful
pattern-match semantics. |
IRubyObject |
op_match19(ThreadContext context,
IRubyObject str) |
IRubyObject |
op_match2_19(ThreadContext context) |
IRubyObject |
op_match2(ThreadContext context) |
IRubyObject |
options() |
org.joni.Regex |
preparePattern(RubyString str) |
static void |
preprocessCheck(Ruby runtime,
org.jruby.util.ByteList bytes) |
static RubyString |
preprocessDRegexp(Ruby runtime,
IRubyObject[] strings,
RegexpOptions options) |
static RubyString |
preprocessDRegexp(Ruby runtime,
RubyString[] strings,
int embeddedOptions) |
static org.jruby.util.ByteList |
quote19(org.jruby.util.ByteList bs,
boolean asciiOnly) |
static IRubyObject |
quote19(ThreadContext context,
IRubyObject recv,
IRubyObject arg)
rb_reg_s_quote
|
int |
search(ThreadContext context,
RubyString str,
int pos,
boolean reverse,
IRubyObject[] holder)
rb_reg_search
|
int |
search19(ThreadContext context,
RubyString str,
int pos,
boolean reverse)
MRI: rb_reg_search
This version uses current thread context to hold the resulting match data.
|
int |
search19(ThreadContext context,
RubyString str,
int pos,
boolean reverse,
boolean setBackrefStr,
IRubyObject[] holder)
MRI: rb_reg_search0
Holder, if non-null, will receive the backref result rather than setting it into context.
|
int |
search19(ThreadContext context,
RubyString str,
int pos,
boolean reverse,
IRubyObject[] holder)
MRI: rb_reg_search
Holder, if non-null, will receive the backref result rather than setting it into context.
|
void |
setEncoding(org.jcodings.Encoding encoding) |
void |
setEncodingNone() |
void |
setLiteral() |
boolean |
shouldMarshalEncoding() |
IRubyObject |
source()
rb_reg_source
|
IRubyObject |
to_s()
rb_any_to_s
call-seq:
obj.to_s => string
Returns a string representing obj.
|
static IRubyObject |
try_convert(ThreadContext context,
IRubyObject recv,
IRubyObject args) |
static IRubyObject |
union(ThreadContext context,
IRubyObject recv,
IRubyObject[] args)
rb_reg_s_union
|
static IRubyObject |
union19(ThreadContext context,
IRubyObject recv,
IRubyObject[] args) |
static RubyRegexp |
unmarshalFrom(UnmarshalStream input) |
attachToObjectSpace, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, convertToType, createObjectClass, eqlInternal, equalInternal, equals, hashCode, initialize, initialize, inspect, op_eqq, puts, specificEval, toString
addFinalizer, anyToString, asJavaString, asString, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callSuper, checkArrayType, checkCallMethod, checkFrozen, checkStringType, checkStringType19, compareTo, convertToArray, convertToFloat, convertToHash, convertToInteger, convertToInteger, convertToInteger, convertToString, copyInstanceVariablesInto, copySpecialInstanceVariables, createBasicObjectClass, dataGetStruct, dataGetStructChecked, dataWrapStruct, display, dup, ensureInstanceVariablesSettable, eql_p, eql, equal_p, equal_p19, evalUnder, extend, fastGetInstanceVariable, fastGetInternalVariable, fastHasInstanceVariable, fastHasInternalVariable, fastSetInstanceVariable, fastSetInternalVariable, freeze, frozen_p, getFFIHandle, getFlag, getInstanceEvalClass, getInstanceVariable, getInstanceVariableList, getInstanceVariableNameList, getInstanceVariables, getInternalVariable, getInternalVariables, getJavaClass, getMetaClass, getNativeHandle, getNativeTypeIndex, getObjectId, getRuntime, getSingletonClass, getSingletonClassClone, getType, getVariable, getVariableCount, getVariableList, getVariableNameList, hashyInspect, hasInstanceVariable, hasInternalVariable, hasVariables, id, infectBy, initialize19, inspectHashCode, instance_eval, instance_eval, instance_eval, instance_eval, instance_eval19, instance_eval19, instance_eval19, instance_eval19, instance_exec, instance_exec19, instance_of_p, instance_variable_defined_p, instance_variable_get, instance_variable_set, instance_variables, instance_variables19, isBuiltin, isClass, isFalse, isFrozen, isImmediate, isModule, isNil, isSpecialConst, isTaint, isTrue, isUntrusted, kind_of_p, makeMetaClass, method_missing19, method, method19, methods, methods, methods19, nil_p, OBJ_INIT_COPY, objInitCopy, op_cmp, op_equal_19, op_not_equal, op_not_match, op_not, private_methods, private_methods19, protected_methods, protected_methods19, public_methods, public_methods19, rbClone, rbInspect, remove_instance_variable, removeFinalizers, removeInstanceVariable, removeInternalVariable, respond_to_p, respond_to_p, respond_to_p19, respond_to_p19, respondsTo, respondsToMissing, respondsToMissing, send, send, send, send, send, send19, send19, send19, send19, setFFIHandle, setFlag, setFrozen, setInstanceVariable, setInternalVariable, setMetaClass, setNativeHandle, setTaint, setUntrusted, setVariable, singleton_method_added19, singleton_method_removed19, singleton_method_undefined19, singleton_methods, specificEval, specificEval, specificEval, specificEval, syncVariables, syncVariables, taint, taint, tainted_p, testFrozen, testFrozen, to_a, toJava, trust, type_deprecated, type, untaint, untrust, untrusted_p, validateInstanceVariable, variableTableContains, variableTableFastContains, variableTableFastFetch, variableTableFastStore, variableTableFetch, variableTableRemove, variableTableStore, variableTableSync, yieldUnder, yieldUnder
public static final int ARG_ENCODING_FIXED
public static final int ARG_ENCODING_NONE
public void setLiteral()
public void clearLiteral()
public boolean isLiteral()
public boolean isKCodeDefault()
public void setEncodingNone()
public void clearEncodingNone()
public boolean isEncodingNone()
public KCode getKCode()
public org.jcodings.Encoding getEncoding()
getEncoding
in interface EncodingCapable
public void setEncoding(org.jcodings.Encoding encoding)
setEncoding
in interface EncodingCapable
public boolean shouldMarshalEncoding()
shouldMarshalEncoding
in interface MarshalEncoding
public org.jcodings.Encoding getMarshalEncoding()
getMarshalEncoding
in interface MarshalEncoding
public static int matcherSearch(Ruby runtime, org.joni.Matcher matcher, int start, int range, int option)
public static int matcherMatch(Ruby runtime, org.joni.Matcher matcher, int start, int range, int option)
public ClassIndex getNativeClassIndex()
RubyObject
getNativeClassIndex
in interface CoreObjectType
getNativeClassIndex
in class RubyObject
ClassIndex
public static RubyRegexp newRegexp(Ruby runtime, String pattern, RegexpOptions options)
public static RubyRegexp newRegexp(Ruby runtime, org.jruby.util.ByteList pattern, int options)
public static RubyRegexp newRegexp(Ruby runtime, org.jruby.util.ByteList pattern, RegexpOptions options)
public static RubyRegexp newDRegexp(Ruby runtime, RubyString pattern, RegexpOptions options)
public static RubyRegexp newDRegexp(Ruby runtime, RubyString pattern, int joniOptions)
public static RubyRegexp newDRegexpEmbedded(Ruby runtime, RubyString pattern, int embeddedOptions)
public static RubyRegexp newDRegexpEmbedded19(Ruby runtime, IRubyObject[] strings, int embeddedOptions)
public static RubyRegexp newRegexp(Ruby runtime, org.jruby.util.ByteList pattern)
public static RubyRegexp newRegexpFromStr(Ruby runtime, RubyString s, int options)
public RegexpOptions getOptions()
public final org.joni.Regex getPattern()
public final org.joni.Regex preparePattern(RubyString str)
public static void preprocessCheck(Ruby runtime, org.jruby.util.ByteList bytes)
public static RubyString preprocessDRegexp(Ruby runtime, RubyString[] strings, int embeddedOptions)
public static RubyString preprocessDRegexp(Ruby runtime, IRubyObject[] strings, RegexpOptions options)
public static IRubyObject try_convert(ThreadContext context, IRubyObject recv, IRubyObject args)
public static IRubyObject quote19(ThreadContext context, IRubyObject recv, IRubyObject arg)
public static org.jruby.util.ByteList quote19(org.jruby.util.ByteList bs, boolean asciiOnly)
public static IRubyObject last_match_s(ThreadContext context, IRubyObject recv)
public static IRubyObject last_match_s(ThreadContext context, IRubyObject recv, IRubyObject nth)
public static IRubyObject union(ThreadContext context, IRubyObject recv, IRubyObject[] args)
public static IRubyObject union19(ThreadContext context, IRubyObject recv, IRubyObject[] args)
public IRubyObject initialize_copy(IRubyObject re)
initialize_copy
in class RubyBasicObject
public IRubyObject initialize_m(IRubyObject arg)
public IRubyObject initialize_m(IRubyObject arg0, IRubyObject arg1)
public IRubyObject initialize_m(IRubyObject arg0, IRubyObject arg1, IRubyObject arg2)
public IRubyObject initialize_m19(IRubyObject arg)
public IRubyObject initialize_m19(IRubyObject arg0, IRubyObject arg1)
public IRubyObject initialize_m19(IRubyObject arg0, IRubyObject arg1, IRubyObject arg2)
public RubyFixnum hash()
RubyBasicObject
hash
in class RubyBasicObject
public IRubyObject op_equal(ThreadContext context, IRubyObject other)
op_equal
in interface IRubyObject
op_equal
in class RubyBasicObject
public IRubyObject op_match2(ThreadContext context)
public IRubyObject op_match2_19(ThreadContext context)
public IRubyObject eqq(ThreadContext context, IRubyObject arg)
public IRubyObject eqq19(ThreadContext context, IRubyObject arg)
public IRubyObject op_match(ThreadContext context, IRubyObject arg)
RubyBasicObject
Regexp
and String
) to provide meaningful
pattern-match semantics.op_match
in class RubyBasicObject
public IRubyObject op_match19(ThreadContext context, IRubyObject str)
op_match19
in class RubyBasicObject
public IRubyObject match_m(ThreadContext context, IRubyObject str)
public IRubyObject match_m19(ThreadContext context, IRubyObject str, Block block)
public IRubyObject match_m19(ThreadContext context, IRubyObject str, boolean useBackref, Block block)
public IRubyObject match_m19(ThreadContext context, IRubyObject str, IRubyObject pos, Block block)
public final int search(ThreadContext context, RubyString str, int pos, boolean reverse, IRubyObject[] holder)
public final int search19(ThreadContext context, RubyString str, int pos, boolean reverse)
public final int search19(ThreadContext context, RubyString str, int pos, boolean reverse, IRubyObject[] holder)
public final int search19(ThreadContext context, RubyString str, int pos, boolean reverse, boolean setBackrefStr, IRubyObject[] holder)
public IRubyObject options()
public IRubyObject casefold_p(ThreadContext context)
public IRubyObject source()
public IRubyObject inspect()
inspect
in interface IRubyObject
inspect
in class RubyBasicObject
public IRubyObject inspect19()
public IRubyObject to_s()
RubyBasicObject
to_s
prints the object's class and an encoding of the
object id. As a special case, the top-level object that is the
initial execution context of Ruby programs returns ``main.''to_s
in class RubyBasicObject
public String[] getNames()
public IRubyObject names(ThreadContext context)
public IRubyObject named_captures(ThreadContext context)
public IRubyObject encoding(ThreadContext context)
public IRubyObject fixed_encoding_p(ThreadContext context)
public static IRubyObject nth_match(int nth, IRubyObject match)
public static IRubyObject last_match(IRubyObject match)
public static IRubyObject match_pre(IRubyObject match)
public static IRubyObject match_post(IRubyObject match)
public static IRubyObject match_last(IRubyObject match)
public static RubyRegexp unmarshalFrom(UnmarshalStream input) throws IOException
IOException
public static void marshalTo(RubyRegexp regexp, MarshalStream output) throws IOException
IOException
Copyright © 2001-2015 JRuby. All Rights Reserved.