org.jruby
Class RubyMatchData

java.lang.Object
  extended by org.jruby.RubyObject
      extended by org.jruby.RubyMatchData
All Implemented Interfaces:
java.lang.Cloneable, IRubyObject
Direct Known Subclasses:
RubyMatchData.JavaString, RubyMatchData.RString

public abstract class RubyMatchData
extends RubyObject

Author:
amoore

Nested Class Summary
static class RubyMatchData.JavaString
           
static class RubyMatchData.RString
           
 
Nested classes/interfaces inherited from class org.jruby.RubyObject
RubyObject.Finalizer
 
Field Summary
protected  Matcher matcher
           
 
Fields inherited from class org.jruby.RubyObject
instanceVariables, isTrue, metaClass, NEVER, OBJECT_ALLOCATOR
 
Fields inherited from interface org.jruby.runtime.builtin.IRubyObject
NULL_ARRAY
 
Constructor Summary
RubyMatchData(Ruby runtime, Matcher matcher)
           
 
Method Summary
 IRubyObject aref(IRubyObject[] args)
          match_aref
 int begin(int index)
           
 IRubyObject begin(IRubyObject index)
          match_begin
abstract  IRubyObject captures()
           
static RubyClass createMatchDataClass(Ruby runtime)
           
abstract  IRubyObject doClone()
           
 int end(int index)
           
 IRubyObject end(IRubyObject index)
          match_end
 boolean find()
           
 long getSize()
           
abstract  IRubyObject group(long n)
           
 IRubyObject inspect()
          rb_obj_inspect
 void invalidateRegs()
           
 int matchEndPosition()
           
 int matchStartPosition()
           
 IRubyObject offset(IRubyObject index)
          match_offset
abstract  RubyString post_match()
          match_post_match
abstract  RubyString pre_match()
          match_pre_match
 boolean proceed()
           
 RubyFixnum size()
          match_size
abstract  RubyString string()
          match_string
 IRubyObject subseq(long beg, long len)
           
abstract  RubyArray to_a()
          match_to_a
abstract  IRubyObject to_s()
          match_to_s
 
Methods inherited from class org.jruby.RubyObject
addFinalizer, anyToString, asString, asSymbol, attachToObjectSpace, callInit, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethodMissing, callMethodMissing, callSuper, checkArrayType, checkFrozen, checkStringType, compilerCallMethod, compilerCallMethodWithIndex, convertToArray, convertToFloat, convertToHash, convertToInteger, convertToString, convertToType, convertToType, convertToType, convertToTypeWithCheck, createObjectClass, dataGetStruct, dataWrapStruct, display, dup, eql, eqlInternal, equal, equalInternal, equals, evalSimple, evalUnder, evalWithBinding, extend, freeze, frozen, getInstanceVariable, getInstanceVariables, getInstanceVariablesSnapshot, getJavaClass, getMetaClass, getNativeTypeIndex, getRuntime, getSingletonClass, getSingletonClassClone, getType, hash, hashCode, id_deprecated, id, infectBy, inherited, initCopy, initialize_copy, initialize, instance_eval, instance_exec, instance_of, instance_variable_get, instance_variable_set, instance_variables, instanceVariableNames, isFalse, isFrozen, isImmediate, isKindOf, isNil, isSingleton, isTaint, isTrue, kind_of, makeMetaClass, match, method, methods, nil_p, obj_equal, private_methods, protected_methods, public_methods, puts, rbClone, remove_instance_variable, removeFinalizers, removeInstanceVariable, respond_to, respondsTo, safeGetInstanceVariables, safeHasInstanceVariables, send, setFrozen, setInstanceVariable, setInstanceVariable, setInstanceVariables, setMetaClass, setTaint, singleton_methods, specificEval, taint, tainted, testFrozen, toString, trueFalseNil, trueFalseNil, type_deprecated, type, untaint
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

matcher

protected Matcher matcher
Constructor Detail

RubyMatchData

public RubyMatchData(Ruby runtime,
                     Matcher matcher)
Method Detail

createMatchDataClass

public static RubyClass createMatchDataClass(Ruby runtime)

captures

public abstract IRubyObject captures()

subseq

public IRubyObject subseq(long beg,
                          long len)

getSize

public long getSize()

proceed

public boolean proceed()

find

public boolean find()

invalidateRegs

public void invalidateRegs()

group

public abstract IRubyObject group(long n)

matchStartPosition

public int matchStartPosition()

matchEndPosition

public int matchEndPosition()

aref

public IRubyObject aref(IRubyObject[] args)
match_aref


begin

public IRubyObject begin(IRubyObject index)
match_begin


begin

public int begin(int index)

end

public IRubyObject end(IRubyObject index)
match_end


end

public int end(int index)

inspect

public IRubyObject inspect()
Description copied from class: RubyObject
rb_obj_inspect

Specified by:
inspect in interface IRubyObject
Overrides:
inspect in class RubyObject
Returns:
String

size

public RubyFixnum size()
match_size


offset

public IRubyObject offset(IRubyObject index)
match_offset


pre_match

public abstract RubyString pre_match()
match_pre_match


post_match

public abstract RubyString post_match()
match_post_match


string

public abstract RubyString string()
match_string


to_a

public abstract RubyArray to_a()
match_to_a


to_s

public abstract IRubyObject to_s()
match_to_s

Overrides:
to_s in class RubyObject

doClone

public abstract IRubyObject doClone()
Overrides:
doClone in class RubyObject


Copyright © 2002-2007 JRuby Team. All Rights Reserved.