View Javadoc

1   //  jGABL2 - The Java Graph Algorithm Base Library
2   //  Copyright (C) 2000-2006  Alexander Schwartz
3   //
4   //  This library is free software; you can redistribute it and/or
5   //  modify it under the terms of the GNU Lesser General Public
6   //  License as published by the Free Software Foundation; either
7   //  version 2.1 of the License, or (at your option) any later version.
8   //
9   //  This library is distributed in the hope that it will be useful,
10  //  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  //  Lesser General Public License for more details.
13  
14  package net.sf.jgabl2.core.util.check;
15  
16  import net.sf.jgabl2.core.util.check.impl.NormalCheckPolicyImpl;
17  
18  /**
19   * A dummy implementation of
20   * a manager which can retrieve a {@link CheckPolicy}
21   * for a specified class.
22   *
23   * @author Alexander Schwartz
24   * @since 0.1.0
25   */
26  public final class CheckPolicyManager {
27  
28      ///CLOVER:OFF
29      /** Prevents instantiation. */
30      private CheckPolicyManager() {
31          // nothing to do
32      }
33      ///CLOVER:ON
34  
35      /**
36       * Returns {@link CheckPolicy} for a specified class.
37       *
38       * @param forClass the class for which a
39       *         {@link CheckPolicy} is requested.
40       * @return a {@link CheckPolicy}; may not be <code>null</code>
41       */
42      public static CheckPolicy getCheckPolicy(final Class<?> forClass) {
43          return new NormalCheckPolicyImpl();
44      }
45  }