org.jruby.runtime.regexp
Class JDKRegexpAdapter

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

public class JDKRegexpAdapter
extends IRegexpAdapter

Regexp adapter for Java 1.4+.


Constructor Summary
JDKRegexpAdapter()
           
 
Method Summary
 void compile(Ruby ruby, java.lang.String regex)
          Compile the regex.
 boolean getCasefold()
          Get whether matches are case-insensitive or not
 IRubyObject search(Ruby ruby, 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

JDKRegexpAdapter

public JDKRegexpAdapter()
Method Detail

compile

public void compile(Ruby ruby,
                    java.lang.String regex)
             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 ruby,
                          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.