1 /*
2 * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
266 static final Tag allTags[] = {
267 A, ADDRESS, APPLET, AREA, B, BASE, BASEFONT, BIG,
268 BLOCKQUOTE, BODY, BR, CAPTION, CENTER, CITE, CODE,
269 DD, DFN, DIR, DIV, DL, DT, EM, FONT, FORM, FRAME,
270 FRAMESET, H1, H2, H3, H4, H5, H6, HEAD, HR, HTML,
271 I, IMG, INPUT, ISINDEX, KBD, LI, LINK, MAP, MENU,
272 META, NOBR, NOFRAMES, OBJECT, OL, OPTION, P, PARAM,
273 PRE, SAMP, SCRIPT, SELECT, SMALL, SPAN, STRIKE, S,
274 STRONG, STYLE, SUB, SUP, TABLE, TD, TEXTAREA,
275 TH, TITLE, TR, TT, U, UL, VAR
276 };
277
278 static {
279 // Force HTMLs static initialize to be loaded.
280 getTag("html");
281 }
282 }
283
284 // There is no unique instance of UnknownTag, so we allow it to be
285 // Serializable.
286 public static class UnknownTag extends Tag implements Serializable {
287
288 /**
289 * Creates a new <code>UnknownTag</code> with the specified
290 * <code>id</code>.
291 * @param id the id of the new tag
292 */
293 public UnknownTag(String id) {
294 super(id);
295 }
296
297 /**
298 * Returns the hash code which corresponds to the string
299 * for this tag.
300 */
301 public int hashCode() {
302 return toString().hashCode();
303 }
304
305 /**
|
1 /*
2 * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
266 static final Tag allTags[] = {
267 A, ADDRESS, APPLET, AREA, B, BASE, BASEFONT, BIG,
268 BLOCKQUOTE, BODY, BR, CAPTION, CENTER, CITE, CODE,
269 DD, DFN, DIR, DIV, DL, DT, EM, FONT, FORM, FRAME,
270 FRAMESET, H1, H2, H3, H4, H5, H6, HEAD, HR, HTML,
271 I, IMG, INPUT, ISINDEX, KBD, LI, LINK, MAP, MENU,
272 META, NOBR, NOFRAMES, OBJECT, OL, OPTION, P, PARAM,
273 PRE, SAMP, SCRIPT, SELECT, SMALL, SPAN, STRIKE, S,
274 STRONG, STYLE, SUB, SUP, TABLE, TD, TEXTAREA,
275 TH, TITLE, TR, TT, U, UL, VAR
276 };
277
278 static {
279 // Force HTMLs static initialize to be loaded.
280 getTag("html");
281 }
282 }
283
284 // There is no unique instance of UnknownTag, so we allow it to be
285 // Serializable.
286 @SuppressWarnings("serial") // Same-version serialization only
287 public static class UnknownTag extends Tag implements Serializable {
288
289 /**
290 * Creates a new <code>UnknownTag</code> with the specified
291 * <code>id</code>.
292 * @param id the id of the new tag
293 */
294 public UnknownTag(String id) {
295 super(id);
296 }
297
298 /**
299 * Returns the hash code which corresponds to the string
300 * for this tag.
301 */
302 public int hashCode() {
303 return toString().hashCode();
304 }
305
306 /**
|