com.simonstl.fragment
Class RegexProcFactory
java.lang.Object
|
+--com.simonstl.fragment.RegexProcFactory
- public class RegexProcFactory
- extends java.lang.Object
RegexProcFactory creates processors which allow developers to plug in alternative packages
for processing regular expressions.
The System properties identify which classes are used:
com.simonstl.fragment.matchProc
- for match-style fragmentation
com.simonstl.fragment.splitProc
- for split-style fragmentation
com.simonstl.fragment.seriesProc
- for lex-style fragmentation (not implemented!
Version 0.03 makes this a Factory class, creating instances of classes instead of wrapping them here.
Version 0.02 starts the move toward plug-in functionality by adding the createSplitter() and createMatcher() methods,
but they aren't used yet.
- Version:
- 0.03 11 July 2001
- Author:
- Simon St.Laurent
Method Summary |
static RegExInt |
createRegEx(int split,
java.lang.String pattern)
The createRegEx() method returns an object which implements the RegExInt interface for match() processing using a regex package wrapped in the object identified by the com.simonstl.fragment.matchProc , com.simonstl.fragment.splitProc , or com.simonstl.fragment.seriesProc property. |
protected static RegExInt |
createRegEx(java.lang.String className)
Attempt to create a from a class name. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RegexProcFactory
public RegexProcFactory()
createRegEx
public static RegExInt createRegEx(int split,
java.lang.String pattern)
- The createRegEx() method returns an object which implements the
RegExInt
interface for match() processing using a regex package wrapped in the object identified by the com.simonstl.fragment.matchProc
, com.simonstl.fragment.splitProc
, or com.simonstl.fragment.seriesProc
property.
createRegEx
protected static RegExInt createRegEx(java.lang.String className)
throws java.lang.Exception
- Attempt to create a from a class name.
Given a class name, this method attempts to load
and instantiate the class as a Matcher.
- Returns:
- An object supporting the
RegExInt
interface. - Throws:
org.xml.sax.SAXException
- If the class cannot be
loaded, instantiated, and cast to RegExInt.