View Javadoc
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: RegexpEngineNotFoundException.java,v $ 37 * 38 * Author: Jose San Leandro Armend?riz 39 * 40 * Description: Generic exception thrown at runtime when the 41 * specified regexp engine is not found. 42 * 43 * Last modified by: $Author: chous $ at $Date: 2003/06/21 11:56:06 $ 44 * 45 * File version: $Revision: 1.5 $ 46 * 47 * Project version: $Name: $ 48 * ("Name" means no concrete version has been checked out) 49 * 50 * $Id: RegexpEngineNotFoundException.java,v 1.5 2003/06/21 11:56:06 chous Exp $ 51 * 52 */ 53 package org.acmsl.regexpplugin; 54 55 /* 56 * Importing some ACM classes. 57 */ 58 import org.acmsl.version.Version; 59 import org.acmsl.version.Versionable; 60 import org.acmsl.version.VersionFactory; 61 62 /* 63 * Importing some JDK classes. 64 */ 65 import java.io.Serializable; 66 import java.lang.Exception; 67 68 /*** 69 * Generic exception thrown at runtime when the specified regexp engine 70 * is not found. 71 * @author <a href="mailto:jsanleandro@yahoo.es" 72 >Jose San Leandro Armend?riz</a> 73 * @version $Revision: 1.5 $ 74 */ 75 public class RegexpEngineNotFoundException 76 extends Exception 77 implements Serializable, 78 Versionable 79 { 80 /*** 81 * Engine name. 82 */ 83 private String m__strEngineName; 84 85 /*** 86 * Engine version. 87 */ 88 private String m__strEngineVersion; 89 90 /*** 91 * Engine package name. 92 */ 93 private String m__strPackageName; 94 95 /*** 96 * Compiler class name. 97 */ 98 private String m__strCompilerClassName; 99 100 /*** 101 * Matcher class name. 102 */ 103 private String m__strMatcherClassName; 104 105 /*** 106 * Helper class name. 107 */ 108 private String m__strHelperClassName; 109 110 /*** 111 * Just constructs the exception with the default logic defined in 112 * its super class. 113 * @param engineName the name of the Regexp implementation whose 114 * instatiation has failed. 115 * @param engineVersion the version of the engine. 116 * @param packageName the name of the engine class package. 117 * @param compilerClassName the compiler class name. 118 * @param matcherClassName the matcher class name. 119 * @param helperClassName the helper class name. 120 */ 121 public RegexpEngineNotFoundException( 122 String engineName, 123 String engineVersion, 124 String packageName, 125 String compilerClassName, 126 String matcherClassName, 127 String helperClassName) 128 { 129 setEngineName(engineName); 130 setEngineVersion(engineVersion); 131 setEnginePackage(packageName); 132 setCompilerClassName(compilerClassName); 133 setMatcherClassName(matcherClassName); 134 setHelperClassName(helperClassName); 135 } 136 137 /*** 138 * Retrieves the implementation name. 139 * @return implementation name. 140 */ 141 public String getEngineName() 142 { 143 return m__strEngineName; 144 } 145 146 /*** 147 * Sets the implementation name. 148 * @param engineName implementation name. 149 */ 150 protected void setEngineName(String engineName) 151 { 152 m__strEngineName = engineName; 153 } 154 155 /*** 156 * Retrieves the implementation version. It's not calculated, 157 * just based on what the implementation provides. 158 * @return the version of the implementation. 159 */ 160 public String getEngineVersion() 161 { 162 return m__strEngineVersion; 163 } 164 165 /*** 166 * Sets the implementation version. 167 * @param engineVersion the version of the implementation. 168 */ 169 protected void setEngineVersion(String engineVersion) 170 { 171 m__strEngineVersion = engineVersion; 172 } 173 174 /*** 175 * Retrieves the Regexp implementation package name. 176 * @return the engine package. 177 */ 178 public String getEnginePackage() 179 { 180 return m__strPackageName; 181 } 182 183 /*** 184 * Sets the Regexp implementation package name. 185 * @param enginePackage the engine package. 186 */ 187 protected void setEnginePackage(String enginePackage) 188 { 189 m__strPackageName = enginePackage; 190 } 191 192 /*** 193 * Retrieves the compiler class name of the Regexp implementation 194 * whose instantiation has thrown the runtime exception. 195 * @return the compiler class name. 196 */ 197 public String getCompilerClassName() 198 { 199 return m__strCompilerClassName; 200 } 201 202 /*** 203 * Sets the compiler class name of the Regexp implementation. 204 * @param compilerClassName the compiler class name. 205 */ 206 protected void setCompilerClassName(String compilerClassName) 207 { 208 m__strCompilerClassName = compilerClassName; 209 } 210 211 /*** 212 * Retrieves the matcher class name of the Regexp implementation 213 * whose instantiation has thrown the runtime exception. 214 * @return the matcher class name. 215 */ 216 public String getMatcherClassName() 217 { 218 return m__strMatcherClassName; 219 } 220 221 /*** 222 * Sets the matcher class name of the Regexp implementation. 223 * @param matcherClassName the matcher class name. 224 */ 225 protected void setMatcherClassName(String matcherClassName) 226 { 227 m__strMatcherClassName = matcherClassName; 228 } 229 230 /*** 231 * Retrieves the helper class name of the Regexp implementation 232 * whose instantiation has thrown the runtime exception. 233 * @return the helper class name. 234 */ 235 public String getHelperClassName() 236 { 237 return m__strHelperClassName; 238 } 239 240 /*** 241 * Sets the helper class name of the Regexp implementation. 242 * @param helperClassName the helper class name. 243 */ 244 protected void setHelperClassName(String helperClassName) 245 { 246 m__strHelperClassName = helperClassName; 247 } 248 249 /*** 250 * Concrete version object updated everytime it's checked-in in a CVS 251 * repository. 252 */ 253 public static final Version VERSION = 254 VersionFactory.createVersion("$Revision: 1.5 $"); 255 256 /*** 257 * Retrieves the current version of this object. 258 * @return the version object with such information. 259 */ 260 public Version getVersion() 261 { 262 return VERSION; 263 } 264 265 /*** 266 * Retrieves the current version of this class. 267 * @return the object with class version information. 268 */ 269 public static Version getClassVersion() 270 { 271 return VERSION; 272 } 273 }

This page was automatically generated by Maven