net.sf.mmm.util.pattern.api
Interface PatternCompiler

All Known Implementing Classes:
AbstractGlobPatternCompiler, GlobPatternCompiler, PathPatternCompiler, RegexInfixPatternCompiler, RegexPatternCompiler, WildcardGlobPatternCompiler

public interface PatternCompiler

This is the interface for a compiler that can compile an pattern-expression given as string into a Pattern.
The intention is to abstract from Pattern.compile(String, int) and therefore also allow other dialects like glob-patterns.

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

Method Summary
 Pattern compile(String pattern)
           
 

Method Detail

compile

Pattern compile(String pattern)
                throws IllegalArgumentException
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.