net.sf.mmm.util.pattern.base
Class RegexPatternCompiler

java.lang.Object
  extended by net.sf.mmm.util.pattern.base.RegexPatternCompiler
All Implemented Interfaces:
PatternCompiler
Direct Known Subclasses:
RegexInfixPatternCompiler

public class RegexPatternCompiler
extends Object
implements PatternCompiler

This is the canonical implementation of the PatternCompiler interface. It simply delegates to Pattern.compile(String, int).

Since:
1.0.0
Author:
Joerg Hohwiller (hohwille at users.sourceforge.net)

Field Summary
private  int flags
           
 
Constructor Summary
RegexPatternCompiler()
          The constructor.
RegexPatternCompiler(int flags)
          The constructor.
 
Method Summary
 Pattern compile(String pattern)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

flags

private final int flags
See Also:
RegexPatternCompiler(int)
Constructor Detail

RegexPatternCompiler

public RegexPatternCompiler()
The constructor.


RegexPatternCompiler

public RegexPatternCompiler(int flags)
The constructor.

Parameters:
flags - are the compiler flags.
Method Detail

compile

public Pattern compile(String pattern)
                throws IllegalArgumentException

Specified by:
compile in interface PatternCompiler
Parameters:
pattern - is the expression to be compiled as pattern.
Returns:
the compiled pattern. May only return null if explicitly documented by the underlying implementation. E.g. if the given pattern is just a plain string without wildcards.
Throws:
IllegalArgumentException - if the given pattern has illegal syntax for the underlying compiler.
See Also:
Pattern.compile(String)


Copyright © 2001-2010 mmm-Team. All Rights Reserved.