Coverage Report - com.puppycrawl.tools.checkstyle.PackageObjectFactory
 
Classes in this File Line Coverage Branch Coverage Complexity
PackageObjectFactory
100%
315/315
100%
40/40
0
PackageObjectFactory$ModuleLoadOption
100%
3/3
N/A
0
 
 1  
 ////////////////////////////////////////////////////////////////////////////////
 2  
 // checkstyle: Checks Java source code for adherence to a set of rules.
 3  
 // Copyright (C) 2001-2017 the original author or authors.
 4  
 //
 5  
 // This library is free software; you can redistribute it and/or
 6  
 // modify it under the terms of the GNU Lesser General Public
 7  
 // License as published by the Free Software Foundation; either
 8  
 // version 2.1 of the License, or (at your option) any later version.
 9  
 //
 10  
 // This library is distributed in the hope that it will be useful,
 11  
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 12  
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 13  
 // Lesser General Public License for more details.
 14  
 //
 15  
 // You should have received a copy of the GNU Lesser General Public
 16  
 // License along with this library; if not, write to the Free Software
 17  
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 18  
 ////////////////////////////////////////////////////////////////////////////////
 19  
 
 20  
 package com.puppycrawl.tools.checkstyle;
 21  
 
 22  
 import java.io.IOException;
 23  
 import java.lang.reflect.Constructor;
 24  
 import java.util.Collections;
 25  
 import java.util.HashMap;
 26  
 import java.util.LinkedHashSet;
 27  
 import java.util.Map;
 28  
 import java.util.Set;
 29  
 import java.util.stream.Collectors;
 30  
 
 31  
 import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
 32  
 import com.puppycrawl.tools.checkstyle.api.LocalizedMessage;
 33  
 import com.puppycrawl.tools.checkstyle.utils.ModuleReflectionUtils;
 34  
 
 35  
 /**
 36  
  * A factory for creating objects from package names and names.
 37  
  * Consider the below example for better understanding.
 38  
  * <ul>
 39  
  *     <li>module name - name of java class that represents module;</li>
 40  
  *     <li>module full name - fully qualifies name of java class that represents module;</li>
 41  
  *     <li>check module short name - name of Check without 'Check' suffix;</li>
 42  
  *     <li>check module name - name of java class that represents Check (with 'Check' suffix);</li>
 43  
  *     <li>
 44  
  *         check module full name - fully qualifies name of java class
 45  
  *         that represents Check (with 'Check' suffix).
 46  
  *     </li>
 47  
  * </ul>
 48  
  * @author Rick Giles
 49  
  * @author lkuehne
 50  
  */
 51  
 public class PackageObjectFactory implements ModuleFactory {
 52  
 
 53  
     /**
 54  
      * Enum class to define loading options.
 55  
      */
 56  30
     public enum ModuleLoadOption {
 57  
         /**
 58  
          * Searching from registered checkstyle modules and from packages given in constructor.
 59  
          **/
 60  10
         SEARCH_REGISTERED_PACKAGES,
 61  
         /**
 62  
          * As SEARCH_REGISTERED_PACKAGES and also try to load class from all of packages given in
 63  
          * constructor.
 64  
          * Required for eclipse-cs plugin.
 65  
          **/
 66  10
         TRY_IN_ALL_REGISTERED_PACKAGES,
 67  
     }
 68  
 
 69  
     /** Base package of checkstyle modules checks. */
 70  
     public static final String BASE_PACKAGE = "com.puppycrawl.tools.checkstyle";
 71  
 
 72  
     /** Exception message when it is unable to create a class instance. */
 73  
     public static final String UNABLE_TO_INSTANTIATE_EXCEPTION_MESSAGE =
 74  
             "PackageObjectFactory.unableToInstantiateExceptionMessage";
 75  
 
 76  
     /** Exception message when there is ambiguous module name in config file. */
 77  
     public static final String AMBIGUOUS_MODULE_NAME_EXCEPTION_MESSAGE =
 78  
             "PackageObjectFactory.ambiguousModuleNameExceptionMessage";
 79  
 
 80  
     /** Suffix of checks. */
 81  
     public static final String CHECK_SUFFIX = "Check";
 82  
 
 83  
     /** Character separate package names in qualified name of java class. */
 84  
     public static final String PACKAGE_SEPARATOR = ".";
 85  
 
 86  
     /** Exception message when null class loader is given. */
 87  
     public static final String NULL_LOADER_MESSAGE = "moduleClassLoader must not be null";
 88  
 
 89  
     /** Exception message when null package name is given. */
 90  
     public static final String NULL_PACKAGE_MESSAGE = "package name must not be null";
 91  
 
 92  
     /** Separator to use in strings. */
 93  
     public static final String STRING_SEPARATOR = ", ";
 94  
 
 95  
     /** Map of Checkstyle module names to their fully qualified names. */
 96  10
     private static final Map<String, String> NAME_TO_FULL_MODULE_NAME = new HashMap<>();
 97  
 
 98  
     /** A list of package names to prepend to class names. */
 99  
     private final Set<String> packages;
 100  
 
 101  
     /** The class loader used to load Checkstyle core and custom modules. */
 102  
     private final ClassLoader moduleClassLoader;
 103  
 
 104  
     /** Map of third party Checkstyle module names to the set of their fully qualified names. */
 105  
     private Map<String, Set<String>> thirdPartyNameToFullModuleNames;
 106  
 
 107  
     /** Module load option which defines class search type. */
 108  
     private ModuleLoadOption moduleLoadOption;
 109  
 
 110  
     static {
 111  10
         fillShortToFullModuleNamesMap();
 112  10
     }
 113  
 
 114  
     /**
 115  
      * Creates a new {@code PackageObjectFactory} instance.
 116  
      * @param packageNames the list of package names to use
 117  
      * @param moduleClassLoader class loader used to load Checkstyle
 118  
      *          core and custom modules
 119  
      */
 120  
     public PackageObjectFactory(Set<String> packageNames, ClassLoader moduleClassLoader) {
 121  2052
         this(packageNames, moduleClassLoader, ModuleLoadOption.SEARCH_REGISTERED_PACKAGES);
 122  2050
     }
 123  
 
 124  
     /**
 125  
      * Creates a new {@code PackageObjectFactory} instance.
 126  
      * @param packageNames the list of package names to use
 127  
      * @param moduleClassLoader class loader used to load Checkstyle
 128  
      *          core and custom modules
 129  
      * @param moduleLoadOption loading option
 130  
      */
 131  
     public PackageObjectFactory(Set<String> packageNames, ClassLoader moduleClassLoader,
 132  2056
             ModuleLoadOption moduleLoadOption) {
 133  2056
         if (moduleClassLoader == null) {
 134  1
             throw new IllegalArgumentException(NULL_LOADER_MESSAGE);
 135  
         }
 136  2055
         if (packageNames.contains(null)) {
 137  2
             throw new IllegalArgumentException(NULL_PACKAGE_MESSAGE);
 138  
         }
 139  
 
 140  
         //create a copy of the given set, but retain ordering
 141  2053
         packages = new LinkedHashSet<>(packageNames);
 142  2053
         this.moduleClassLoader = moduleClassLoader;
 143  2053
         this.moduleLoadOption = moduleLoadOption;
 144  2053
     }
 145  
 
 146  
     /**
 147  
      * Creates a new {@code PackageObjectFactory} instance.
 148  
      * @param packageName The package name to use
 149  
      * @param moduleClassLoader class loader used to load Checkstyle
 150  
      *          core and custom modules
 151  
      */
 152  65
     public PackageObjectFactory(String packageName, ClassLoader moduleClassLoader) {
 153  65
         if (moduleClassLoader == null) {
 154  1
             throw new IllegalArgumentException(NULL_LOADER_MESSAGE);
 155  
         }
 156  64
         if (packageName == null) {
 157  1
             throw new IllegalArgumentException(NULL_PACKAGE_MESSAGE);
 158  
         }
 159  
 
 160  63
         packages = new LinkedHashSet<>(1);
 161  63
         packages.add(packageName);
 162  63
         this.moduleClassLoader = moduleClassLoader;
 163  63
     }
 164  
 
 165  
     /**
 166  
      * Creates a new instance of a class from a given name, or that name
 167  
      * concatenated with &quot;Check&quot;. If the name is
 168  
      * a class name, creates an instance of the named class. Otherwise, creates
 169  
      * an instance of a class name obtained by concatenating the given name
 170  
      * to a package name from a given list of package names.
 171  
      * @param name the name of a class.
 172  
      * @return the {@code Object} created by loader.
 173  
      * @throws CheckstyleException if an error occurs.
 174  
      */
 175  
     @Override
 176  
     public Object createModule(String name) throws CheckstyleException {
 177  4447
         Object instance = null;
 178  
         // if the name is a simple class name, try to find it in maps at first
 179  4447
         if (!name.contains(PACKAGE_SEPARATOR)) {
 180  1321
             instance = createFromStandardCheckSet(name);
 181  
             // find the name in third party map
 182  1321
             if (instance == null) {
 183  10
                 if (thirdPartyNameToFullModuleNames == null) {
 184  8
                     thirdPartyNameToFullModuleNames =
 185  8
                             generateThirdPartyNameToFullModuleName(moduleClassLoader);
 186  
                 }
 187  10
                 instance = createObjectFromMap(name, thirdPartyNameToFullModuleNames);
 188  
             }
 189  
         }
 190  4446
         if (instance == null) {
 191  3133
             instance = createObject(name);
 192  
         }
 193  4445
         if (instance == null
 194  
                 && moduleLoadOption == ModuleLoadOption.TRY_IN_ALL_REGISTERED_PACKAGES) {
 195  2
             instance = createModuleByTryInEachPackage(name);
 196  
         }
 197  4445
         if (instance == null) {
 198  8
             String attemptedNames = null;
 199  8
             if (!name.contains(PACKAGE_SEPARATOR)) {
 200  7
                 final String nameCheck = name + CHECK_SUFFIX;
 201  7
                 attemptedNames = joinPackageNamesWithClassName(name, packages)
 202  
                         + STRING_SEPARATOR + nameCheck + STRING_SEPARATOR
 203  7
                         + joinPackageNamesWithClassName(nameCheck, packages);
 204  
             }
 205  8
             final LocalizedMessage exceptionMessage = new LocalizedMessage(0,
 206  
                 Definitions.CHECKSTYLE_BUNDLE, UNABLE_TO_INSTANTIATE_EXCEPTION_MESSAGE,
 207  8
                 new String[] {name, attemptedNames}, null, getClass(), null);
 208  8
             throw new CheckstyleException(exceptionMessage.getMessage());
 209  
         }
 210  4437
         return instance;
 211  
     }
 212  
 
 213  
     /**
 214  
      * Create object from one of Checkstyle module names.
 215  
      * @param name name of module.
 216  
      * @return instance of module.
 217  
      * @throws CheckstyleException if the class fails to instantiate or there are ambiguous classes.
 218  
      */
 219  
     private Object createFromStandardCheckSet(String name) throws CheckstyleException {
 220  1321
         final String fullModuleName = NAME_TO_FULL_MODULE_NAME.get(name);
 221  1321
         Object instance = null;
 222  1321
         if (fullModuleName == null) {
 223  849
             final String fullCheckModuleName =
 224  849
                     NAME_TO_FULL_MODULE_NAME.get(name + CHECK_SUFFIX);
 225  849
             if (fullCheckModuleName != null) {
 226  839
                 instance = createObject(fullCheckModuleName);
 227  
             }
 228  849
         }
 229  
         else {
 230  472
             instance = createObject(fullModuleName);
 231  
         }
 232  1321
         return instance;
 233  
     }
 234  
 
 235  
     /**
 236  
      * Create object with the help of the supplied map.
 237  
      * @param name name of module.
 238  
      * @param map the supplied map.
 239  
      * @return instance of module if it is found in modules map and no ambiguous classes exist.
 240  
      * @throws CheckstyleException if the class fails to instantiate or there are ambiguous classes.
 241  
      */
 242  
     private Object createObjectFromMap(String name, Map<String, Set<String>> map)
 243  
             throws CheckstyleException {
 244  10
         final Set<String> fullModuleNames = map.get(name);
 245  10
         Object instance = null;
 246  10
         if (fullModuleNames == null) {
 247  8
             final Set<String> fullCheckModuleNames = map.get(name + CHECK_SUFFIX);
 248  8
             if (fullCheckModuleNames != null) {
 249  1
                 instance = createObjectFromFullModuleNames(name, fullCheckModuleNames);
 250  
             }
 251  8
         }
 252  
         else {
 253  2
             instance = createObjectFromFullModuleNames(name, fullModuleNames);
 254  
         }
 255  9
         return instance;
 256  
     }
 257  
 
 258  
     /**
 259  
      * Create Object from optional full module names.
 260  
      * In most case, there should be only one element in {@code fullModuleName}, otherwise
 261  
      * an exception would be thrown.
 262  
      * @param name name of module
 263  
      * @param fullModuleNames the supplied full module names set
 264  
      * @return instance of module if there is only one element in {@code fullModuleName}
 265  
      * @throws CheckstyleException if the class fails to instantiate or there are more than one
 266  
      *      element in {@code fullModuleName}
 267  
      */
 268  
     private Object createObjectFromFullModuleNames(String name, Set<String> fullModuleNames)
 269  
             throws CheckstyleException {
 270  
         final Object returnValue;
 271  3
         if (fullModuleNames.size() == 1) {
 272  2
             returnValue = createObject(fullModuleNames.iterator().next());
 273  
         }
 274  
         else {
 275  1
             final String optionalNames = fullModuleNames.stream()
 276  1
                     .sorted()
 277  1
                     .collect(Collectors.joining(STRING_SEPARATOR));
 278  1
             final LocalizedMessage exceptionMessage = new LocalizedMessage(0,
 279  
                     Definitions.CHECKSTYLE_BUNDLE, AMBIGUOUS_MODULE_NAME_EXCEPTION_MESSAGE,
 280  1
                     new String[] {name, optionalNames}, null, getClass(), null);
 281  1
             throw new CheckstyleException(exceptionMessage.getMessage());
 282  
         }
 283  2
         return returnValue;
 284  
     }
 285  
 
 286  
     /**
 287  
      * Generate the map of third party Checkstyle module names to the set of their fully qualified
 288  
      * names.
 289  
      * @param loader the class loader used to load Checkstyle package names
 290  
      * @return the map of third party Checkstyle module names to the set of their fully qualified
 291  
      *      names
 292  
      */
 293  
     private Map<String, Set<String>> generateThirdPartyNameToFullModuleName(ClassLoader loader) {
 294  
         Map<String, Set<String>> returnValue;
 295  
         try {
 296  9
             returnValue = ModuleReflectionUtils.getCheckstyleModules(packages, loader).stream()
 297  8
                     .collect(Collectors.toMap(
 298  
                         Class::getSimpleName,
 299  5
                         cls -> Collections.singleton(cls.getCanonicalName()),
 300  
                         (fullNames1, fullNames2) -> {
 301  1
                             final Set<String> mergedNames = new LinkedHashSet<>(fullNames1);
 302  1
                             mergedNames.addAll(fullNames2);
 303  1
                             return mergedNames;
 304  
                         }));
 305  
         }
 306  1
         catch (IOException ignore) {
 307  1
             returnValue = new HashMap<>();
 308  8
         }
 309  9
         return returnValue;
 310  
     }
 311  
 
 312  
     /**
 313  
      * Creates a string by joining package names with a class name.
 314  
      * @param className name of the class for joining.
 315  
      * @param packages packages names.
 316  
      * @return a string which is obtained by joining package names with a class name.
 317  
      */
 318  
     private static String joinPackageNamesWithClassName(String className, Set<String> packages) {
 319  30
         return packages.stream().collect(
 320  15
             Collectors.joining(PACKAGE_SEPARATOR + className + STRING_SEPARATOR, "",
 321  
                     PACKAGE_SEPARATOR + className));
 322  
     }
 323  
 
 324  
     /**
 325  
      * Creates a new instance of a named class.
 326  
      * @param className the name of the class to instantiate.
 327  
      * @return the {@code Object} created by loader or null.
 328  
      * @throws CheckstyleException if the class fails to instantiate.
 329  
      */
 330  
     private Object createObject(String className) throws CheckstyleException {
 331  4454
         Class<?> clazz = null;
 332  
 
 333  
         try {
 334  4454
             clazz = Class.forName(className, true, moduleClassLoader);
 335  
         }
 336  14
         catch (final ReflectiveOperationException | NoClassDefFoundError ignored) {
 337  
             // ignore the exception
 338  4440
         }
 339  
 
 340  4454
         Object instance = null;
 341  
 
 342  4454
         if (clazz != null) {
 343  
             try {
 344  4440
                 final Constructor<?> declaredConstructor = clazz.getDeclaredConstructor();
 345  4440
                 declaredConstructor.setAccessible(true);
 346  4440
                 instance = declaredConstructor.newInstance();
 347  
             }
 348  1
             catch (final ReflectiveOperationException ex) {
 349  1
                 throw new CheckstyleException("Unable to instantiate " + className, ex);
 350  4439
             }
 351  
         }
 352  
 
 353  4453
         return instance;
 354  
     }
 355  
 
 356  
     /**
 357  
      * Searching to class with given name (or name concatenated with &quot;Check&quot;) in existing
 358  
      * packages. Returns instance if class found or, otherwise, null.
 359  
      * @param name the name of a class.
 360  
      * @return the {@code Object} created by loader.
 361  
      * @throws CheckstyleException if an error occurs.
 362  
      */
 363  
     private Object createModuleByTryInEachPackage(String name) throws CheckstyleException {
 364  4
         final Set<String> possibleNames = packages.stream()
 365  10
                 .map(packageName -> packageName + PACKAGE_SEPARATOR + name)
 366  4
                 .collect(Collectors.toSet());
 367  8
         possibleNames.addAll(possibleNames.stream()
 368  10
                 .map(possibleName -> possibleName + CHECK_SUFFIX)
 369  4
                 .collect(Collectors.toSet()));
 370  4
         Object instance = null;
 371  4
         for (String possibleName : possibleNames) {
 372  8
             instance = createObject(possibleName);
 373  8
             if (instance != null) {
 374  3
                 break;
 375  
             }
 376  5
         }
 377  4
         return instance;
 378  
     }
 379  
 
 380  
     /**
 381  
      * Fill short-to-full module names map.
 382  
      */
 383  
     private static void fillShortToFullModuleNamesMap() {
 384  10
         fillChecksFromAnnotationPackage();
 385  10
         fillChecksFromBlocksPackage();
 386  10
         fillChecksFromCodingPackage();
 387  10
         fillChecksFromDesignPackage();
 388  10
         fillChecksFromHeaderPackage();
 389  10
         fillChecksFromImportsPackage();
 390  10
         fillChecksFromIndentationPackage();
 391  10
         fillChecksFromJavadocPackage();
 392  10
         fillChecksFromMetricsPackage();
 393  10
         fillChecksFromModifierPackage();
 394  10
         fillChecksFromNamingPackage();
 395  10
         fillChecksFromRegexpPackage();
 396  10
         fillChecksFromSizesPackage();
 397  10
         fillChecksFromWhitespacePackage();
 398  10
         fillModulesFromChecksPackage();
 399  10
         fillModulesFromFilefiltersPackage();
 400  10
         fillModulesFromFiltersPackage();
 401  10
         fillModulesFromCheckstylePackage();
 402  10
     }
 403  
 
 404  
     /**
 405  
      * Fill short-to-full module names map with Checks from annotation package.
 406  
      */
 407  
     private static void fillChecksFromAnnotationPackage() {
 408  10
         NAME_TO_FULL_MODULE_NAME.put("AnnotationLocationCheck",
 409  
                 BASE_PACKAGE + ".checks.annotation.AnnotationLocationCheck");
 410  10
         NAME_TO_FULL_MODULE_NAME.put("AnnotationOnSameLineCheck",
 411  
                 BASE_PACKAGE + ".checks.annotation.AnnotationOnSameLineCheck");
 412  10
         NAME_TO_FULL_MODULE_NAME.put("AnnotationUseStyleCheck",
 413  
                 BASE_PACKAGE + ".checks.annotation.AnnotationUseStyleCheck");
 414  10
         NAME_TO_FULL_MODULE_NAME.put("MissingDeprecatedCheck",
 415  
                 BASE_PACKAGE + ".checks.annotation.MissingDeprecatedCheck");
 416  10
         NAME_TO_FULL_MODULE_NAME.put("MissingOverrideCheck",
 417  
                 BASE_PACKAGE + ".checks.annotation.MissingOverrideCheck");
 418  10
         NAME_TO_FULL_MODULE_NAME.put("PackageAnnotationCheck",
 419  
                 BASE_PACKAGE + ".checks.annotation.PackageAnnotationCheck");
 420  10
         NAME_TO_FULL_MODULE_NAME.put("SuppressWarningsCheck",
 421  
                 BASE_PACKAGE + ".checks.annotation.SuppressWarningsCheck");
 422  10
     }
 423  
 
 424  
     /**
 425  
      * Fill short-to-full module names map with Checks from blocks package.
 426  
      */
 427  
     private static void fillChecksFromBlocksPackage() {
 428  10
         NAME_TO_FULL_MODULE_NAME.put("AvoidNestedBlocksCheck",
 429  
                 BASE_PACKAGE + ".checks.blocks.AvoidNestedBlocksCheck");
 430  10
         NAME_TO_FULL_MODULE_NAME.put("EmptyBlockCheck",
 431  
                 BASE_PACKAGE + ".checks.blocks.EmptyBlockCheck");
 432  10
         NAME_TO_FULL_MODULE_NAME.put("EmptyCatchBlockCheck",
 433  
                 BASE_PACKAGE + ".checks.blocks.EmptyCatchBlockCheck");
 434  10
         NAME_TO_FULL_MODULE_NAME.put("LeftCurlyCheck",
 435  
                 BASE_PACKAGE + ".checks.blocks.LeftCurlyCheck");
 436  10
         NAME_TO_FULL_MODULE_NAME.put("NeedBracesCheck",
 437  
                 BASE_PACKAGE + ".checks.blocks.NeedBracesCheck");
 438  10
         NAME_TO_FULL_MODULE_NAME.put("RightCurlyCheck",
 439  
                 BASE_PACKAGE + ".checks.blocks.RightCurlyCheck");
 440  10
     }
 441  
 
 442  
     /**
 443  
      * Fill short-to-full module names map with Checks from coding package.
 444  
      */
 445  
     // -@cs[ExecutableStatementCount] splitting this method is not reasonable.
 446  
     private static void fillChecksFromCodingPackage() {
 447  10
         NAME_TO_FULL_MODULE_NAME.put("ArrayTrailingCommaCheck",
 448  
                 BASE_PACKAGE + ".checks.coding.ArrayTrailingCommaCheck");
 449  10
         NAME_TO_FULL_MODULE_NAME.put("AvoidInlineConditionalsCheck",
 450  
                 BASE_PACKAGE + ".checks.coding.AvoidInlineConditionalsCheck");
 451  10
         NAME_TO_FULL_MODULE_NAME.put("CovariantEqualsCheck",
 452  
                 BASE_PACKAGE + ".checks.coding.CovariantEqualsCheck");
 453  10
         NAME_TO_FULL_MODULE_NAME.put("DeclarationOrderCheck",
 454  
                 BASE_PACKAGE + ".checks.coding.DeclarationOrderCheck");
 455  10
         NAME_TO_FULL_MODULE_NAME.put("DefaultComesLastCheck",
 456  
                 BASE_PACKAGE + ".checks.coding.DefaultComesLastCheck");
 457  10
         NAME_TO_FULL_MODULE_NAME.put("EmptyStatementCheck",
 458  
                 BASE_PACKAGE + ".checks.coding.EmptyStatementCheck");
 459  10
         NAME_TO_FULL_MODULE_NAME.put("EqualsAvoidNullCheck",
 460  
                 BASE_PACKAGE + ".checks.coding.EqualsAvoidNullCheck");
 461  10
         NAME_TO_FULL_MODULE_NAME.put("EqualsHashCodeCheck",
 462  
                 BASE_PACKAGE + ".checks.coding.EqualsHashCodeCheck");
 463  10
         NAME_TO_FULL_MODULE_NAME.put("ExplicitInitializationCheck",
 464  
                 BASE_PACKAGE + ".checks.coding.ExplicitInitializationCheck");
 465  10
         NAME_TO_FULL_MODULE_NAME.put("FallThroughCheck",
 466  
                 BASE_PACKAGE + ".checks.coding.FallThroughCheck");
 467  10
         NAME_TO_FULL_MODULE_NAME.put("FinalLocalVariableCheck",
 468  
                 BASE_PACKAGE + ".checks.coding.FinalLocalVariableCheck");
 469  10
         NAME_TO_FULL_MODULE_NAME.put("HiddenFieldCheck",
 470  
                 BASE_PACKAGE + ".checks.coding.HiddenFieldCheck");
 471  10
         NAME_TO_FULL_MODULE_NAME.put("IllegalCatchCheck",
 472  
                 BASE_PACKAGE + ".checks.coding.IllegalCatchCheck");
 473  10
         NAME_TO_FULL_MODULE_NAME.put("IllegalInstantiationCheck",
 474  
                 BASE_PACKAGE + ".checks.coding.IllegalInstantiationCheck");
 475  10
         NAME_TO_FULL_MODULE_NAME.put("IllegalThrowsCheck",
 476  
                 BASE_PACKAGE + ".checks.coding.IllegalThrowsCheck");
 477  10
         NAME_TO_FULL_MODULE_NAME.put("IllegalTokenCheck",
 478  
                 BASE_PACKAGE + ".checks.coding.IllegalTokenCheck");
 479  10
         NAME_TO_FULL_MODULE_NAME.put("IllegalTokenTextCheck",
 480  
                 BASE_PACKAGE + ".checks.coding.IllegalTokenTextCheck");
 481  10
         NAME_TO_FULL_MODULE_NAME.put("IllegalTypeCheck",
 482  
                 BASE_PACKAGE + ".checks.coding.IllegalTypeCheck");
 483  10
         NAME_TO_FULL_MODULE_NAME.put("InnerAssignmentCheck",
 484  
                 BASE_PACKAGE + ".checks.coding.InnerAssignmentCheck");
 485  10
         NAME_TO_FULL_MODULE_NAME.put("MagicNumberCheck",
 486  
                 BASE_PACKAGE + ".checks.coding.MagicNumberCheck");
 487  10
         NAME_TO_FULL_MODULE_NAME.put("MissingCtorCheck",
 488  
                 BASE_PACKAGE + ".checks.coding.MissingCtorCheck");
 489  10
         NAME_TO_FULL_MODULE_NAME.put("MissingSwitchDefaultCheck",
 490  
                 BASE_PACKAGE + ".checks.coding.MissingSwitchDefaultCheck");
 491  10
         NAME_TO_FULL_MODULE_NAME.put("ModifiedControlVariableCheck",
 492  
                 BASE_PACKAGE + ".checks.coding.ModifiedControlVariableCheck");
 493  10
         NAME_TO_FULL_MODULE_NAME.put("MultipleStringLiteralsCheck",
 494  
                 BASE_PACKAGE + ".checks.coding.MultipleStringLiteralsCheck");
 495  10
         NAME_TO_FULL_MODULE_NAME.put("MultipleVariableDeclarationsCheck",
 496  
                 BASE_PACKAGE + ".checks.coding.MultipleVariableDeclarationsCheck");
 497  10
         NAME_TO_FULL_MODULE_NAME.put("NestedForDepthCheck",
 498  
                 BASE_PACKAGE + ".checks.coding.NestedForDepthCheck");
 499  10
         NAME_TO_FULL_MODULE_NAME.put("NestedIfDepthCheck",
 500  
                 BASE_PACKAGE + ".checks.coding.NestedIfDepthCheck");
 501  10
         NAME_TO_FULL_MODULE_NAME.put("NestedTryDepthCheck",
 502  
                 BASE_PACKAGE + ".checks.coding.NestedTryDepthCheck");
 503  10
         NAME_TO_FULL_MODULE_NAME.put("NoCloneCheck",
 504  
                 BASE_PACKAGE + ".checks.coding.NoCloneCheck");
 505  10
         NAME_TO_FULL_MODULE_NAME.put("NoFinalizerCheck",
 506  
                 BASE_PACKAGE + ".checks.coding.NoFinalizerCheck");
 507  10
         NAME_TO_FULL_MODULE_NAME.put("OneStatementPerLineCheck",
 508  
                 BASE_PACKAGE + ".checks.coding.OneStatementPerLineCheck");
 509  10
         NAME_TO_FULL_MODULE_NAME.put("OverloadMethodsDeclarationOrderCheck",
 510  
                 BASE_PACKAGE + ".checks.coding.OverloadMethodsDeclarationOrderCheck");
 511  10
         NAME_TO_FULL_MODULE_NAME.put("PackageDeclarationCheck",
 512  
                 BASE_PACKAGE + ".checks.coding.PackageDeclarationCheck");
 513  10
         NAME_TO_FULL_MODULE_NAME.put("ParameterAssignmentCheck",
 514  
                 BASE_PACKAGE + ".checks.coding.ParameterAssignmentCheck");
 515  10
         NAME_TO_FULL_MODULE_NAME.put("RequireThisCheck",
 516  
                 BASE_PACKAGE + ".checks.coding.RequireThisCheck");
 517  10
         NAME_TO_FULL_MODULE_NAME.put("ReturnCountCheck",
 518  
                 BASE_PACKAGE + ".checks.coding.ReturnCountCheck");
 519  10
         NAME_TO_FULL_MODULE_NAME.put("SimplifyBooleanExpressionCheck",
 520  
                 BASE_PACKAGE + ".checks.coding.SimplifyBooleanExpressionCheck");
 521  10
         NAME_TO_FULL_MODULE_NAME.put("SimplifyBooleanReturnCheck",
 522  
                 BASE_PACKAGE + ".checks.coding.SimplifyBooleanReturnCheck");
 523  10
         NAME_TO_FULL_MODULE_NAME.put("StringLiteralEqualityCheck",
 524  
                 BASE_PACKAGE + ".checks.coding.StringLiteralEqualityCheck");
 525  10
         NAME_TO_FULL_MODULE_NAME.put("SuperCloneCheck",
 526  
                 BASE_PACKAGE + ".checks.coding.SuperCloneCheck");
 527  10
         NAME_TO_FULL_MODULE_NAME.put("SuperFinalizeCheck",
 528  
                 BASE_PACKAGE + ".checks.coding.SuperFinalizeCheck");
 529  10
         NAME_TO_FULL_MODULE_NAME.put("UnnecessaryParenthesesCheck",
 530  
                 BASE_PACKAGE + ".checks.coding.UnnecessaryParenthesesCheck");
 531  10
         NAME_TO_FULL_MODULE_NAME.put("VariableDeclarationUsageDistanceCheck",
 532  
                 BASE_PACKAGE + ".checks.coding.VariableDeclarationUsageDistanceCheck");
 533  10
     }
 534  
 
 535  
     /**
 536  
      * Fill short-to-full module names map with Checks from design package.
 537  
      */
 538  
     private static void fillChecksFromDesignPackage() {
 539  10
         NAME_TO_FULL_MODULE_NAME.put("DesignForExtensionCheck",
 540  
                 BASE_PACKAGE + ".checks.design.DesignForExtensionCheck");
 541  10
         NAME_TO_FULL_MODULE_NAME.put("FinalClassCheck",
 542  
                 BASE_PACKAGE + ".checks.design.FinalClassCheck");
 543  10
         NAME_TO_FULL_MODULE_NAME.put("HideUtilityClassConstructorCheck",
 544  
                 BASE_PACKAGE + ".checks.design.HideUtilityClassConstructorCheck");
 545  10
         NAME_TO_FULL_MODULE_NAME.put("InnerTypeLastCheck",
 546  
                 BASE_PACKAGE + ".checks.design.InnerTypeLastCheck");
 547  10
         NAME_TO_FULL_MODULE_NAME.put("InterfaceIsTypeCheck",
 548  
                 BASE_PACKAGE + ".checks.design.InterfaceIsTypeCheck");
 549  10
         NAME_TO_FULL_MODULE_NAME.put("MutableExceptionCheck",
 550  
                 BASE_PACKAGE + ".checks.design.MutableExceptionCheck");
 551  10
         NAME_TO_FULL_MODULE_NAME.put("OneTopLevelClassCheck",
 552  
                 BASE_PACKAGE + ".checks.design.OneTopLevelClassCheck");
 553  10
         NAME_TO_FULL_MODULE_NAME.put("ThrowsCountCheck",
 554  
                 BASE_PACKAGE + ".checks.design.ThrowsCountCheck");
 555  10
         NAME_TO_FULL_MODULE_NAME.put("VisibilityModifierCheck",
 556  
                 BASE_PACKAGE + ".checks.design.VisibilityModifierCheck");
 557  10
     }
 558  
 
 559  
     /**
 560  
      * Fill short-to-full module names map with Checks from header package.
 561  
      */
 562  
     private static void fillChecksFromHeaderPackage() {
 563  10
         NAME_TO_FULL_MODULE_NAME.put("HeaderCheck",
 564  
                 BASE_PACKAGE + ".checks.header.HeaderCheck");
 565  10
         NAME_TO_FULL_MODULE_NAME.put("RegexpHeaderCheck",
 566  
                 BASE_PACKAGE + ".checks.header.RegexpHeaderCheck");
 567  10
     }
 568  
 
 569  
     /**
 570  
      * Fill short-to-full module names map with Checks from imports package.
 571  
      */
 572  
     private static void fillChecksFromImportsPackage() {
 573  10
         NAME_TO_FULL_MODULE_NAME.put("AvoidStarImportCheck",
 574  
                 BASE_PACKAGE + ".checks.imports.AvoidStarImportCheck");
 575  10
         NAME_TO_FULL_MODULE_NAME.put("AvoidStaticImportCheck",
 576  
                 BASE_PACKAGE + ".checks.imports.AvoidStaticImportCheck");
 577  10
         NAME_TO_FULL_MODULE_NAME.put("CustomImportOrderCheck",
 578  
                 BASE_PACKAGE + ".checks.imports.CustomImportOrderCheck");
 579  10
         NAME_TO_FULL_MODULE_NAME.put("IllegalImportCheck",
 580  
                 BASE_PACKAGE + ".checks.imports.IllegalImportCheck");
 581  10
         NAME_TO_FULL_MODULE_NAME.put("ImportControlCheck",
 582  
                 BASE_PACKAGE + ".checks.imports.ImportControlCheck");
 583  10
         NAME_TO_FULL_MODULE_NAME.put("ImportOrderCheck",
 584  
                 BASE_PACKAGE + ".checks.imports.ImportOrderCheck");
 585  10
         NAME_TO_FULL_MODULE_NAME.put("RedundantImportCheck",
 586  
                 BASE_PACKAGE + ".checks.imports.RedundantImportCheck");
 587  10
         NAME_TO_FULL_MODULE_NAME.put("UnusedImportsCheck",
 588  
                 BASE_PACKAGE + ".checks.imports.UnusedImportsCheck");
 589  10
     }
 590  
 
 591  
     /**
 592  
      * Fill short-to-full module names map with Checks from indentation package.
 593  
      */
 594  
     private static void fillChecksFromIndentationPackage() {
 595  10
         NAME_TO_FULL_MODULE_NAME.put("CommentsIndentationCheck",
 596  
                 BASE_PACKAGE + ".checks.indentation.CommentsIndentationCheck");
 597  10
         NAME_TO_FULL_MODULE_NAME.put("IndentationCheck",
 598  
                 BASE_PACKAGE + ".checks.indentation.IndentationCheck");
 599  10
     }
 600  
 
 601  
     /**
 602  
      * Fill short-to-full module names map with Checks from javadoc package.
 603  
      */
 604  
     private static void fillChecksFromJavadocPackage() {
 605  10
         NAME_TO_FULL_MODULE_NAME.put("AtclauseOrderCheck",
 606  
                 BASE_PACKAGE + ".checks.javadoc.AtclauseOrderCheck");
 607  10
         NAME_TO_FULL_MODULE_NAME.put("JavadocMethodCheck",
 608  
                 BASE_PACKAGE + ".checks.javadoc.JavadocMethodCheck");
 609  10
         NAME_TO_FULL_MODULE_NAME.put("JavadocPackageCheck",
 610  
                 BASE_PACKAGE + ".checks.javadoc.JavadocPackageCheck");
 611  10
         NAME_TO_FULL_MODULE_NAME.put("JavadocParagraphCheck",
 612  
                 BASE_PACKAGE + ".checks.javadoc.JavadocParagraphCheck");
 613  10
         NAME_TO_FULL_MODULE_NAME.put("JavadocStyleCheck",
 614  
                 BASE_PACKAGE + ".checks.javadoc.JavadocStyleCheck");
 615  10
         NAME_TO_FULL_MODULE_NAME.put("JavadocTagContinuationIndentationCheck",
 616  
                 BASE_PACKAGE + ".checks.javadoc.JavadocTagContinuationIndentationCheck");
 617  10
         NAME_TO_FULL_MODULE_NAME.put("JavadocTypeCheck",
 618  
                 BASE_PACKAGE + ".checks.javadoc.JavadocTypeCheck");
 619  10
         NAME_TO_FULL_MODULE_NAME.put("JavadocVariableCheck",
 620  
                 BASE_PACKAGE + ".checks.javadoc.JavadocVariableCheck");
 621  10
         NAME_TO_FULL_MODULE_NAME.put("NonEmptyAtclauseDescriptionCheck",
 622  
                 BASE_PACKAGE + ".checks.javadoc.NonEmptyAtclauseDescriptionCheck");
 623  10
         NAME_TO_FULL_MODULE_NAME.put("SingleLineJavadocCheck",
 624  
                 BASE_PACKAGE + ".checks.javadoc.SingleLineJavadocCheck");
 625  10
         NAME_TO_FULL_MODULE_NAME.put("SummaryJavadocCheck",
 626  
                 BASE_PACKAGE + ".checks.javadoc.SummaryJavadocCheck");
 627  10
         NAME_TO_FULL_MODULE_NAME.put("WriteTagCheck",
 628  
                 BASE_PACKAGE + ".checks.javadoc.WriteTagCheck");
 629  10
     }
 630  
 
 631  
     /**
 632  
      * Fill short-to-full module names map with Checks from metrics package.
 633  
      */
 634  
     private static void fillChecksFromMetricsPackage() {
 635  10
         NAME_TO_FULL_MODULE_NAME.put("BooleanExpressionComplexityCheck",
 636  
                 BASE_PACKAGE + ".checks.metrics.BooleanExpressionComplexityCheck");
 637  10
         NAME_TO_FULL_MODULE_NAME.put("ClassDataAbstractionCouplingCheck",
 638  
                 BASE_PACKAGE + ".checks.metrics.ClassDataAbstractionCouplingCheck");
 639  10
         NAME_TO_FULL_MODULE_NAME.put("ClassFanOutComplexityCheck",
 640  
                 BASE_PACKAGE + ".checks.metrics.ClassFanOutComplexityCheck");
 641  10
         NAME_TO_FULL_MODULE_NAME.put("CyclomaticComplexityCheck",
 642  
                 BASE_PACKAGE + ".checks.metrics.CyclomaticComplexityCheck");
 643  10
         NAME_TO_FULL_MODULE_NAME.put("JavaNCSSCheck",
 644  
                 BASE_PACKAGE + ".checks.metrics.JavaNCSSCheck");
 645  10
         NAME_TO_FULL_MODULE_NAME.put("NPathComplexityCheck",
 646  
                 BASE_PACKAGE + ".checks.metrics.NPathComplexityCheck");
 647  10
     }
 648  
 
 649  
     /**
 650  
      * Fill short-to-full module names map with Checks from modifier package.
 651  
      */
 652  
     private static void fillChecksFromModifierPackage() {
 653  10
         NAME_TO_FULL_MODULE_NAME.put("ModifierOrderCheck",
 654  
                 BASE_PACKAGE + ".checks.modifier.ModifierOrderCheck");
 655  10
         NAME_TO_FULL_MODULE_NAME.put("RedundantModifierCheck",
 656  
                 BASE_PACKAGE + ".checks.modifier.RedundantModifierCheck");
 657  10
     }
 658  
 
 659  
     /**
 660  
      * Fill short-to-full module names map with Checks from naming package.
 661  
      */
 662  
     private static void fillChecksFromNamingPackage() {
 663  10
         NAME_TO_FULL_MODULE_NAME.put("AbbreviationAsWordInNameCheck",
 664  
                 BASE_PACKAGE + ".checks.naming.AbbreviationAsWordInNameCheck");
 665  10
         NAME_TO_FULL_MODULE_NAME.put("AbstractClassNameCheck",
 666  
                 BASE_PACKAGE + ".checks.naming.AbstractClassNameCheck");
 667  10
         NAME_TO_FULL_MODULE_NAME.put("CatchParameterNameCheck",
 668  
                 BASE_PACKAGE + ".checks.naming.CatchParameterNameCheck");
 669  10
         NAME_TO_FULL_MODULE_NAME.put("ClassTypeParameterNameCheck",
 670  
                 BASE_PACKAGE + ".checks.naming.ClassTypeParameterNameCheck");
 671  10
         NAME_TO_FULL_MODULE_NAME.put("ConstantNameCheck",
 672  
                 BASE_PACKAGE + ".checks.naming.ConstantNameCheck");
 673  10
         NAME_TO_FULL_MODULE_NAME.put("InterfaceTypeParameterNameCheck",
 674  
                 BASE_PACKAGE + ".checks.naming.InterfaceTypeParameterNameCheck");
 675  10
         NAME_TO_FULL_MODULE_NAME.put("LocalFinalVariableNameCheck",
 676  
                 BASE_PACKAGE + ".checks.naming.LocalFinalVariableNameCheck");
 677  10
         NAME_TO_FULL_MODULE_NAME.put("LocalVariableNameCheck",
 678  
                 BASE_PACKAGE + ".checks.naming.LocalVariableNameCheck");
 679  10
         NAME_TO_FULL_MODULE_NAME.put("MemberNameCheck",
 680  
                 BASE_PACKAGE + ".checks.naming.MemberNameCheck");
 681  10
         NAME_TO_FULL_MODULE_NAME.put("MethodNameCheck",
 682  
                 BASE_PACKAGE + ".checks.naming.MethodNameCheck");
 683  10
         NAME_TO_FULL_MODULE_NAME.put("MethodTypeParameterNameCheck",
 684  
                 BASE_PACKAGE + ".checks.naming.MethodTypeParameterNameCheck");
 685  10
         NAME_TO_FULL_MODULE_NAME.put("PackageNameCheck",
 686  
                 BASE_PACKAGE + ".checks.naming.PackageNameCheck");
 687  10
         NAME_TO_FULL_MODULE_NAME.put("ParameterNameCheck",
 688  
                 BASE_PACKAGE + ".checks.naming.ParameterNameCheck");
 689  10
         NAME_TO_FULL_MODULE_NAME.put("StaticVariableNameCheck",
 690  
                 BASE_PACKAGE + ".checks.naming.StaticVariableNameCheck");
 691  10
         NAME_TO_FULL_MODULE_NAME.put("TypeNameCheck",
 692  
                 BASE_PACKAGE + ".checks.naming.TypeNameCheck");
 693  10
     }
 694  
 
 695  
     /**
 696  
      * Fill short-to-full module names map with Checks from regexp package.
 697  
      */
 698  
     private static void fillChecksFromRegexpPackage() {
 699  10
         NAME_TO_FULL_MODULE_NAME.put("RegexpCheck",
 700  
                 BASE_PACKAGE + ".checks.regexp.RegexpCheck");
 701  10
         NAME_TO_FULL_MODULE_NAME.put("RegexpMultilineCheck",
 702  
                 BASE_PACKAGE + ".checks.regexp.RegexpMultilineCheck");
 703  10
         NAME_TO_FULL_MODULE_NAME.put("RegexpOnFilenameCheck",
 704  
                 BASE_PACKAGE + ".checks.regexp.RegexpOnFilenameCheck");
 705  10
         NAME_TO_FULL_MODULE_NAME.put("RegexpSinglelineCheck",
 706  
                 BASE_PACKAGE + ".checks.regexp.RegexpSinglelineCheck");
 707  10
         NAME_TO_FULL_MODULE_NAME.put("RegexpSinglelineJavaCheck",
 708  
                 BASE_PACKAGE + ".checks.regexp.RegexpSinglelineJavaCheck");
 709  10
     }
 710  
 
 711  
     /**
 712  
      * Fill short-to-full module names map with Checks from sizes package.
 713  
      */
 714  
     private static void fillChecksFromSizesPackage() {
 715  10
         NAME_TO_FULL_MODULE_NAME.put("AnonInnerLengthCheck",
 716  
                 BASE_PACKAGE + ".checks.sizes.AnonInnerLengthCheck");
 717  10
         NAME_TO_FULL_MODULE_NAME.put("ExecutableStatementCountCheck",
 718  
                 BASE_PACKAGE + ".checks.sizes.ExecutableStatementCountCheck");
 719  10
         NAME_TO_FULL_MODULE_NAME.put("FileLengthCheck",
 720  
                 BASE_PACKAGE + ".checks.sizes.FileLengthCheck");
 721  10
         NAME_TO_FULL_MODULE_NAME.put("LineLengthCheck",
 722  
                 BASE_PACKAGE + ".checks.sizes.LineLengthCheck");
 723  10
         NAME_TO_FULL_MODULE_NAME.put("MethodCountCheck",
 724  
                 BASE_PACKAGE + ".checks.sizes.MethodCountCheck");
 725  10
         NAME_TO_FULL_MODULE_NAME.put("MethodLengthCheck",
 726  
                 BASE_PACKAGE + ".checks.sizes.MethodLengthCheck");
 727  10
         NAME_TO_FULL_MODULE_NAME.put("OuterTypeNumberCheck",
 728  
                 BASE_PACKAGE + ".checks.sizes.OuterTypeNumberCheck");
 729  10
         NAME_TO_FULL_MODULE_NAME.put("ParameterNumberCheck",
 730  
                 BASE_PACKAGE + ".checks.sizes.ParameterNumberCheck");
 731  10
     }
 732  
 
 733  
     /**
 734  
      * Fill short-to-full module names map with Checks from whitespace package.
 735  
      */
 736  
     private static void fillChecksFromWhitespacePackage() {
 737  10
         NAME_TO_FULL_MODULE_NAME.put("EmptyForInitializerPadCheck",
 738  
                 BASE_PACKAGE + ".checks.whitespace.EmptyForInitializerPadCheck");
 739  10
         NAME_TO_FULL_MODULE_NAME.put("EmptyForIteratorPadCheck",
 740  
                 BASE_PACKAGE + ".checks.whitespace.EmptyForIteratorPadCheck");
 741  10
         NAME_TO_FULL_MODULE_NAME.put("EmptyLineSeparatorCheck",
 742  
                 BASE_PACKAGE + ".checks.whitespace.EmptyLineSeparatorCheck");
 743  10
         NAME_TO_FULL_MODULE_NAME.put("FileTabCharacterCheck",
 744  
                 BASE_PACKAGE + ".checks.whitespace.FileTabCharacterCheck");
 745  10
         NAME_TO_FULL_MODULE_NAME.put("GenericWhitespaceCheck",
 746  
                 BASE_PACKAGE + ".checks.whitespace.GenericWhitespaceCheck");
 747  10
         NAME_TO_FULL_MODULE_NAME.put("MethodParamPadCheck",
 748  
                 BASE_PACKAGE + ".checks.whitespace.MethodParamPadCheck");
 749  10
         NAME_TO_FULL_MODULE_NAME.put("NoLineWrapCheck",
 750  
                 BASE_PACKAGE + ".checks.whitespace.NoLineWrapCheck");
 751  10
         NAME_TO_FULL_MODULE_NAME.put("NoWhitespaceAfterCheck",
 752  
                 BASE_PACKAGE + ".checks.whitespace.NoWhitespaceAfterCheck");
 753  10
         NAME_TO_FULL_MODULE_NAME.put("NoWhitespaceBeforeCheck",
 754  
                 BASE_PACKAGE + ".checks.whitespace.NoWhitespaceBeforeCheck");
 755  10
         NAME_TO_FULL_MODULE_NAME.put("OperatorWrapCheck",
 756  
                 BASE_PACKAGE + ".checks.whitespace.OperatorWrapCheck");
 757  10
         NAME_TO_FULL_MODULE_NAME.put("ParenPadCheck",
 758  
                 BASE_PACKAGE + ".checks.whitespace.ParenPadCheck");
 759  10
         NAME_TO_FULL_MODULE_NAME.put("SeparatorWrapCheck",
 760  
                 BASE_PACKAGE + ".checks.whitespace.SeparatorWrapCheck");
 761  10
         NAME_TO_FULL_MODULE_NAME.put("SingleSpaceSeparatorCheck",
 762  
                 BASE_PACKAGE + ".checks.whitespace.SingleSpaceSeparatorCheck");
 763  10
         NAME_TO_FULL_MODULE_NAME.put("TypecastParenPadCheck",
 764  
                 BASE_PACKAGE + ".checks.whitespace.TypecastParenPadCheck");
 765  10
         NAME_TO_FULL_MODULE_NAME.put("WhitespaceAfterCheck",
 766  
                 BASE_PACKAGE + ".checks.whitespace.WhitespaceAfterCheck");
 767  10
         NAME_TO_FULL_MODULE_NAME.put("WhitespaceAroundCheck",
 768  
                 BASE_PACKAGE + ".checks.whitespace.WhitespaceAroundCheck");
 769  10
     }
 770  
 
 771  
     /**
 772  
      * Fill short-to-full module names map with modules from checks package.
 773  
      */
 774  
     private static void fillModulesFromChecksPackage() {
 775  10
         NAME_TO_FULL_MODULE_NAME.put("ArrayTypeStyleCheck",
 776  
                 BASE_PACKAGE + ".checks.ArrayTypeStyleCheck");
 777  10
         NAME_TO_FULL_MODULE_NAME.put("AvoidEscapedUnicodeCharactersCheck",
 778  
                 BASE_PACKAGE + ".checks.AvoidEscapedUnicodeCharactersCheck");
 779  10
         NAME_TO_FULL_MODULE_NAME.put("DescendantTokenCheck",
 780  
                 BASE_PACKAGE + ".checks.DescendantTokenCheck");
 781  10
         NAME_TO_FULL_MODULE_NAME.put("FinalParametersCheck",
 782  
                 BASE_PACKAGE + ".checks.FinalParametersCheck");
 783  10
         NAME_TO_FULL_MODULE_NAME.put("NewlineAtEndOfFileCheck",
 784  
                 BASE_PACKAGE + ".checks.NewlineAtEndOfFileCheck");
 785  10
         NAME_TO_FULL_MODULE_NAME.put("OuterTypeFilenameCheck",
 786  
                 BASE_PACKAGE + ".checks.OuterTypeFilenameCheck");
 787  10
         NAME_TO_FULL_MODULE_NAME.put("SuppressWarningsHolder",
 788  
                 BASE_PACKAGE + ".checks.SuppressWarningsHolder");
 789  10
         NAME_TO_FULL_MODULE_NAME.put("TodoCommentCheck",
 790  
                 BASE_PACKAGE + ".checks.TodoCommentCheck");
 791  10
         NAME_TO_FULL_MODULE_NAME.put("TrailingCommentCheck",
 792  
                 BASE_PACKAGE + ".checks.TrailingCommentCheck");
 793  10
         NAME_TO_FULL_MODULE_NAME.put("TranslationCheck",
 794  
                 BASE_PACKAGE + ".checks.TranslationCheck");
 795  10
         NAME_TO_FULL_MODULE_NAME.put("UncommentedMainCheck",
 796  
                 BASE_PACKAGE + ".checks.UncommentedMainCheck");
 797  10
         NAME_TO_FULL_MODULE_NAME.put("UniquePropertiesCheck",
 798  
                 BASE_PACKAGE + ".checks.UniquePropertiesCheck");
 799  10
         NAME_TO_FULL_MODULE_NAME.put("UpperEllCheck",
 800  
                 BASE_PACKAGE + ".checks.UpperEllCheck");
 801  10
     }
 802  
 
 803  
     /**
 804  
      * Fill short-to-full module names map with modules from filefilters package.
 805  
      */
 806  
     private static void fillModulesFromFilefiltersPackage() {
 807  10
         NAME_TO_FULL_MODULE_NAME.put("BeforeExecutionExclusionFileFilter",
 808  
                 BASE_PACKAGE + ".filefilters.BeforeExecutionExclusionFileFilter");
 809  10
     }
 810  
 
 811  
     /**
 812  
      * Fill short-to-full module names map with modules from filters package.
 813  
      */
 814  
     private static void fillModulesFromFiltersPackage() {
 815  10
         NAME_TO_FULL_MODULE_NAME.put("CsvFilter",
 816  
                 BASE_PACKAGE + ".filters.CsvFilter");
 817  10
         NAME_TO_FULL_MODULE_NAME.put("IntMatchFilter",
 818  
                 BASE_PACKAGE + ".filters.IntMatchFilter");
 819  10
         NAME_TO_FULL_MODULE_NAME.put("IntRangeFilter",
 820  
                 BASE_PACKAGE + ".filters.IntRangeFilter");
 821  10
         NAME_TO_FULL_MODULE_NAME.put("SeverityMatchFilter",
 822  
                 BASE_PACKAGE + ".filters.SeverityMatchFilter");
 823  10
         NAME_TO_FULL_MODULE_NAME.put("SuppressWithPlainTextCommentFilter",
 824  
             BASE_PACKAGE + ".filters.SuppressWithPlainTextCommentFilter");
 825  10
         NAME_TO_FULL_MODULE_NAME.put("SuppressionCommentFilter",
 826  
                 BASE_PACKAGE + ".filters.SuppressionCommentFilter");
 827  10
         NAME_TO_FULL_MODULE_NAME.put("SuppressionFilter",
 828  
                 BASE_PACKAGE + ".filters.SuppressionFilter");
 829  10
         NAME_TO_FULL_MODULE_NAME.put("SuppressionXpathFilter",
 830  
                 BASE_PACKAGE + ".filters.SuppressionXpathFilter");
 831  10
         NAME_TO_FULL_MODULE_NAME.put("SuppressWarningsFilter",
 832  
                 BASE_PACKAGE + ".filters.SuppressWarningsFilter");
 833  10
         NAME_TO_FULL_MODULE_NAME.put("SuppressWithNearbyCommentFilter",
 834  
                 BASE_PACKAGE + ".filters.SuppressWithNearbyCommentFilter");
 835  10
     }
 836  
 
 837  
     /**
 838  
      * Fill short-to-full module names map with modules from checkstyle package.
 839  
      */
 840  
     private static void fillModulesFromCheckstylePackage() {
 841  10
         NAME_TO_FULL_MODULE_NAME.put("Checker", BASE_PACKAGE + ".Checker");
 842  10
         NAME_TO_FULL_MODULE_NAME.put("TreeWalker", BASE_PACKAGE + ".TreeWalker");
 843  10
     }
 844  
 
 845  
 }