01: /*
02: * $Header: /cvsroot/webman-cms/source/webman/com/teamkonzept/lib/TKReg.java,v 1.5 2000/05/22 15:01:21 careck Exp $
03: *
04: */
05: package com.teamkonzept.lib;
06:
07: import com.oroinc.text.regex.*;
08:
09: public class TKReg {
10: static PatternCompiler compiler;
11: static TKSubstitutor substitutor;
12: static boolean initialized = false;
13:
14: public static PatternMatcher getMatcher() {
15: return new Perl5Matcher();
16: }
17:
18: public static PatternCompiler getCompiler() {
19: if (!initialized)
20: init();
21: return compiler;
22: }
23:
24: public static TKSubstitutor getSubstitutor() {
25: if (!initialized)
26: init();
27: return substitutor;
28: }
29:
30: static void init() {
31: if (!initialized) {
32: compiler = new Perl5Compiler();
33: substitutor = new TKSubstitutor();
34: initialized = true;
35: }
36: }
37:
38: static {
39: init();
40: }
41: }
|