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: PatternOROAdapter.java,v $
37 *
38 * Author: Jose San Leandro Armend?riz
39 *
40 * Description: Adapts Perl5Pattern objects to follow the generic interface
41 * defined in this API. A delegation is used because Perl5Pattern
42 * is a final class.
43 *
44 * Last modified by: $Author: dev $ at $Date: 2002/09/27 08:27:16 $
45 *
46 * File version: $Revision: 1.5 $
47 *
48 * Project version: $Name: $
49 * ("Name" means no concrete version has been checked out)
50 *
51 * $Id: PatternOROAdapter.java,v 1.5 2002/09/27 08:27:16 dev Exp $
52 *
53 */
54 package org.acmsl.regexpplugin.jakartaoro;
55
56 /*
57 * Importing some ACM classes.
58 */
59 import org.acmsl.version.Version;
60 import org.acmsl.version.VersionFactory;
61
62 /***
63 * Adapts jakarta ORO Pattern objects to follow the generic interface defined
64 * in this API.
65 * @author <a href="mailto:jsanleandro@yahoo.es"
66 >Jose San Leandro Armend?riz</a>
67 * @version $Revision: 1.5 $
68 */
69 public class PatternOROAdapter
70 implements org.acmsl.regexpplugin.Pattern
71 {
72 /***
73 * Delegated instance.
74 */
75 private org.apache.oro.text.regex.Pattern m__Instance;
76
77 /***
78 * Constructs a PatternOROAdapter for given object.
79 * @param adaptee the instance to be adapted.
80 */
81 public PatternOROAdapter(org.apache.oro.text.regex.Pattern adaptee)
82 {
83 setAdaptee(adaptee);
84 }
85
86 /***
87 * Sets the adaptee.
88 * @param adaptee the instance to adapt.
89 */
90 protected void setAdaptee(org.apache.oro.text.regex.Pattern adaptee)
91 {
92 m__Instance = adaptee;
93 }
94
95 /***
96 * Retrieves an instance of a Perl5Pattern class.
97 * Note: Other classes in this package can access this method.
98 * @return such instance.
99 */
100 org.apache.oro.text.regex.Pattern getDelegatedInstance()
101 {
102 return m__Instance;
103 }
104
105 /***
106 * Concrete version object updated everytime it's checked-in in a CVS
107 * repository.
108 */
109 public static final Version VERSION =
110 VersionFactory.createVersion("$Revision: 1.5 $");
111
112 /***
113 * Retrieves the current version of this object.
114 * @return the version object with such information.
115 */
116 public Version getVersion()
117 {
118 return VERSION;
119 }
120
121 /***
122 * Retrieves the current version of this class.
123 * @return the object with class version information.
124 */
125 public static Version getClassVersion()
126 {
127 return VERSION;
128 }
129 }
This page was automatically generated by Maven