View Javadoc

1   /*
2    * Copyright 2011-2013 smartics, Kronseder & Reiner GmbH
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package de.smartics.tagcloud.cavallo;
17  
18  import org.mcavallo.opencloud.filters.DictionaryFilter;
19  import org.mcavallo.opencloud.filters.TagFilter;
20  
21  /**
22   * Filter on Java reserved words.
23   *
24   * @author <a href="mailto:robert.reiner@smartics.de">Robert Reiner</a>
25   * @version $Revision:591 $
26   */
27  public final class JavaReservedWordsFilter extends DictionaryFilter
28  {
29    // ********************************* Fields *********************************
30  
31    // --- constants ------------------------------------------------------------
32  
33    /**
34     * The class version identifier.
35     * <p>
36     * The value of this constant is {@value}.
37     * </p>
38     */
39    private static final long serialVersionUID = 1L;
40  
41    /**
42     * The singleton instance of the filter.
43     */
44    public static final TagFilter FILTER = new JavaReservedWordsFilter();
45  
46    // --- members --------------------------------------------------------------
47  
48    /**
49     * Default constructor.
50     */
51    private JavaReservedWordsFilter()
52    {
53      super(new String[]
54      { "abstract", "continue", "for", "new", "switch", "assert", "default",
55       "goto", "package", "synchronized", "boolean", "do", "if", "private",
56       "this", "break", "double", "implements", "protected", "throw", "byte",
57       "else", "import", "public", "throws", "case", "enum", "instanceof",
58       "null", "return", "transient", "catch", "extends", "int", "short", "try",
59       "char", "final", "interface", "static", "void", "class", "finally",
60       "long", "strictfp", "volatile", "const", "float", "native", "super",
61       "while", "true", "false" });
62    }
63  
64    // ****************************** Initializer *******************************
65  
66    // ****************************** Constructors ******************************
67  
68    // ****************************** Inner Classes *****************************
69  
70    // ********************************* Methods ********************************
71  
72    // --- init -----------------------------------------------------------------
73  
74    // --- get&set --------------------------------------------------------------
75  
76    // --- business -------------------------------------------------------------
77  
78    /**
79     * Creates an instance of the filer.
80     */
81    public static TagFilter create()
82    {
83      return new JavaReservedWordsFilter();
84    }
85  
86    // --- object basics --------------------------------------------------------
87  
88  }