src/share/classes/com/sun/tools/doclint/HtmlTag.java

changeset 1506
4a3cfc970c6f
parent 1455
75ab654b5cd5
child 1507
967052c425a1
equal deleted inserted replaced
1505:3d84ae209919 1506:4a3cfc970c6f
1 /* 1 /*
2 * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 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 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this 7 * published by the Free Software Foundation. Oracle designates this
271 } 271 }
272 272
273 static final Map<String,Attr> index = new HashMap<String,Attr>(); 273 static final Map<String,Attr> index = new HashMap<String,Attr>();
274 static { 274 static {
275 for (Attr t: values()) { 275 for (Attr t: values()) {
276 index.put(t.name().toLowerCase(), t); 276 index.put(t.getText(), t);
277 } 277 }
278 } 278 }
279 } 279 }
280 280
281 public static enum AttrKind { 281 public static enum AttrKind {
344 } 344 }
345 345
346 private static final Map<String,HtmlTag> index = new HashMap<String,HtmlTag>(); 346 private static final Map<String,HtmlTag> index = new HashMap<String,HtmlTag>();
347 static { 347 static {
348 for (HtmlTag t: values()) { 348 for (HtmlTag t: values()) {
349 index.put(t.name().toLowerCase(), t); 349 index.put(t.getText(), t);
350 } 350 }
351 } 351 }
352 352
353 static HtmlTag get(Name tagName) { 353 static HtmlTag get(Name tagName) {
354 return index.get(tagName.toString().toLowerCase()); 354 return index.get(tagName.toString().toLowerCase());

mercurial