View Javadoc

1   /*
2   
3       stax  Stack API for XML.
4       Copyright (c) 2001-2006 held jointly by the individual authors.
5   
6       This library is free software; you can redistribute it and/or modify it
7       under the terms of the GNU Lesser General Public License as published
8       by the Free Software Foundation; either version 2.1 of the License, or (at
9       your option) any later version.
10  
11      This library is distributed in the hope that it will be useful, but WITHOUT
12      ANY WARRANTY; with out even the implied warranty of MERCHANTABILITY or
13      FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
14      License for more details.
15  
16      You should have received a copy of the GNU Lesser General Public License
17      along with this library;  if not, write to the Free Software Foundation,
18      Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA.
19  
20      > http://www.gnu.org/copyleft/lesser.html
21      > http://www.opensource.org/licenses/lgpl-license.php
22  
23  */
24  package net.sf.stax;
25  
26  /***
27   * Built-in element handlers.
28   *
29   * @author  Michael Heuer
30   * @version $Revision: 1.4 $ $Date: 2006/01/02 20:37:34 $
31   */
32  public final class StAXContentHandlers
33  {
34      /*** Built-in boolean element handler. */
35      private static final StAXContentHandler BOOLEAN_HANDLER = new BooleanElementHandler();
36  
37      /*** Built-in byte element handler. */
38      private static final StAXContentHandler BYTE_HANDLER = new ByteElementHandler();
39  
40      /*** Built-in char element handler. */
41      private static final StAXContentHandler CHAR_HANDLER = new CharElementHandler();
42  
43      /*** Built-in double element handler. */
44      private static final StAXContentHandler DOUBLE_HANDLER = new DoubleElementHandler();
45  
46      /*** Built-in float element handler. */
47      private static final StAXContentHandler FLOAT_HANDLER = new FloatElementHandler();
48  
49      /*** Built-in int element handler. */
50      private static final StAXContentHandler INT_HANDLER = new IntElementHandler();
51  
52      /*** Built-in long element handler. */
53      private static final StAXContentHandler LONG_HANDLER = new LongElementHandler();
54  
55      /*** Built-in string element handler. */
56      private static final StAXContentHandler STRING_HANDLER = new StringElementHandler();
57  
58  
59      /***
60       * Private default constructor.
61       */
62      private StAXContentHandlers()
63      {
64          // empty
65      }
66  
67  
68      /***
69       * Return the built-in boolean element handler.
70       *
71       * @return the built-in boolean element handler
72       */
73      public static StAXContentHandler getBooleanElementHandler()
74      {
75          return BOOLEAN_HANDLER;
76      }
77  
78      /***
79       * Return the built-in boolean element handler.
80       *
81       * @return the built-in boolean element handler
82       */
83      public static StAXContentHandler getByteElementHandler()
84      {
85          return BYTE_HANDLER;
86      }
87  
88      /***
89       * Return the built-in boolean element handler.
90       *
91       * @return the built-in boolean element handler
92       */
93      public static StAXContentHandler getCharElementHandler()
94      {
95          return CHAR_HANDLER;
96      }
97  
98      /***
99       * Return the built-in boolean element handler.
100      *
101      * @return the built-in boolean element handler
102      */
103     public static StAXContentHandler getDoubleElementHandler()
104     {
105         return DOUBLE_HANDLER;
106     }
107 
108     /***
109      * Return the built-in boolean element handler.
110      *
111      * @return the built-in boolean element handler
112      */
113     public static StAXContentHandler getFloatElementHandler()
114     {
115         return FLOAT_HANDLER;
116     }
117 
118     /***
119      * Return the built-in boolean element handler.
120      *
121      * @return the built-in boolean element handler
122      */
123     public static StAXContentHandler getIntElementHandler()
124     {
125         return INT_HANDLER;
126     }
127 
128     /***
129      * Return the built-in boolean element handler.
130      *
131      * @return the built-in boolean element handler
132      */
133     public static StAXContentHandler getLongElementHandler()
134     {
135         return LONG_HANDLER;
136     }
137 
138     /***
139      * Return the built-in boolean element handler.
140      *
141      * @return the built-in boolean element handler
142      */
143     public static StAXContentHandler getStringElementHandler()
144     {
145         return STRING_HANDLER;
146     }
147 }