org.jruby.runtime.regexp
Class GNURegexpAdapter

java.lang.Object
  extended byorg.jruby.runtime.regexp.IRegexpAdapter
      extended byorg.jruby.runtime.regexp.GNURegexpAdapter

public class GNURegexpAdapter
extends IRegexpAdapter

Regexp adapter for gnu.regexp.


Constructor Summary
GNURegexpAdapter()
           
 
Method Summary
 void compile(Ruby runtime, java.lang.String pattern)
          Compile the regex.
 boolean getCasefold()
          Get whether matches are case-insensitive or not
 IRubyObject search(Ruby runtime, java.lang.String target, int startPos)
          Does the given argument match the pattern?
 void setCasefold(boolean set)
          Set whether matches should be case-insensitive or not
 void setExtended(boolean set)
          Set whether patterns can contain comments and extra whitespace
 void setMultiline(boolean set)
          Set whether the dot metacharacter should match newlines
 
Methods inherited from class org.jruby.runtime.regexp.IRegexpAdapter
getAdapter, unextend
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GNURegexpAdapter

public GNURegexpAdapter()
Method Detail

compile

public void compile(Ruby runtime,
                    java.lang.String pattern)
             throws RegexpError
Compile the regex.

Specified by:
compile in class IRegexpAdapter
Throws:
RegexpError

setCasefold

public void setCasefold(boolean set)
Set whether matches should be case-insensitive or not

Specified by:
setCasefold in class IRegexpAdapter

getCasefold

public boolean getCasefold()
Get whether matches are case-insensitive or not

Specified by:
getCasefold in class IRegexpAdapter

setExtended

public void setExtended(boolean set)
Set whether patterns can contain comments and extra whitespace

Specified by:
setExtended in class IRegexpAdapter

setMultiline

public void setMultiline(boolean set)
Set whether the dot metacharacter should match newlines

Specified by:
setMultiline in class IRegexpAdapter

search

public IRubyObject search(Ruby runtime,
                          java.lang.String target,
                          int startPos)
Does the given argument match the pattern?

Specified by:
search in class IRegexpAdapter


Copyright © 2002 Jan Arne Petersen. All Rights Reserved.