1 /*
2 Java Regular Expressions Plugin API
3
4 Copyright (C) 2002 Jose San Leandro Armend?riz
5 jsanleandro@yahoo.es
6 chousz@yahoo.com
7
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public
10 License as published by the Free Software Foundation; either
11 version 2.1 of the License, or (at your option) any later version.
12
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public
19 License along with this library; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
22 Thanks to ACM S.L. for distributing this library under the LGPL license.
23 Contact info: jsr000@terra.es
24 Postal Address: c/Playa de Lagoa, 1
25 Urb. Valdecaba?as
26 Boadilla del monte
27 28660 Madrid
28 Spain
29
30 This library uses some external APIs. So far I haven't released such
31 APIs as projects themselves, but you should be able
32 to download them from the web page where you got this source code.
33
34 ******************************************************************************
35 *
36 * Filename: $RCSfile: Compiler.java,v $
37 *
38 * Author: Jose San Leandro Armend?riz
39 *
40 * Description: Represents a regexp compiler. Different implementations vary
41 * but they all must respect this set of methods.
42 *
43 * Last modified by: $Author: dev $ at $Date: 2002/09/27 08:27:11 $
44 *
45 * File version: $Revision: 1.6 $
46 *
47 * Project version: $Name: $
48 * ("Name" means no concrete version has been checked out)
49 *
50 * $Id: Compiler.java,v 1.6 2002/09/27 08:27:11 dev Exp $
51 *
52 */
53 package org.acmsl.regexpplugin;
54
55 /*
56 * Importing project-specific classes.
57 */
58 import org.acmsl.regexpplugin.Pattern;
59 import org.acmsl.regexpplugin.MalformedPatternException;
60
61 /*
62 * Importing some ACM classes.
63 */
64 import org.acmsl.version.Version;
65 import org.acmsl.version.Versionable;
66 import org.acmsl.version.VersionFactory;
67
68 /***
69 * Represents a regexp compiler. Different implementations vary but they all
70 * must respect this set of methods.
71 * @author <a href="mailto:jsanleandro@yahoo.es"
72 >Jose San Leandro Armend?riz</a>
73 * @version $Revision: 1.6 $
74 */
75 public interface Compiler
76 extends Versionable
77 {
78 /***
79 * Compiles given regular expression and creates a Pattern object to
80 * apply such rule on concrete text contents.
81 * @param regexp the regular expression to compile.
82 * @return the Pattern associated to such regular expression.
83 * @throws MalformedPatternException if given regexp is malformed.
84 */
85 public Pattern compile(String regexp)
86 throws MalformedPatternException;
87
88 /***
89 * Sets whether the compiler should care about case sensitiveness
90 * or not.
91 * @param caseSensitive true for differentiate upper from lower case.
92 */
93 public void setCaseSensitive(boolean caseSensitive);
94
95 /***
96 * Retrieves if the compiler is configured to be case sensitive or not.
97 * @return true if the compiler differentiates upper from lower case.
98 */
99 public boolean isCaseSensitive();
100
101 /***
102 * Sets whether the compiler should care about new line delimiters
103 * or not.
104 * @param multiline false for parsing each line at a time.
105 */
106 public void setMultiline(boolean multiline);
107
108 /***
109 * Retrieves if the compiler is configured to care about new line
110 * delimiters or not.
111 * @return true if the compiler understands new line delimiters.
112 */
113 public boolean isMultiline();
114
115 /***
116 * Concrete version object updated everytime it's checked-in in a CVS
117 * repository.
118 */
119 public static final Version VERSION =
120 VersionFactory.createVersion("$Revision: 1.6 $");
121 }
This page was automatically generated by Maven