01: /*
02: * $Id: TagUtils.java 459911 2006-03-20 12:48:09Z jdonnerstag $ $Revision:
03: * 1.16 $ $Date: 2006-03-20 13:48:09 +0100 (Mon, 20 Mar 2006) $
04: *
05: * ==============================================================================
06: * Licensed under the Apache License, Version 2.0 (the "License"); you may not
07: * use this file except in compliance with the License. You may obtain a copy of
08: * the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing, software
13: * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14: * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15: * License for the specific language governing permissions and limitations under
16: * the License.
17: */
18: package wicket.markup;
19:
20: /**
21: * Some utils to handle tags which otherwise would bloat the Tag AP.
22: *
23: * @author Juergen Donnerstag
24: */
25: public class TagUtils {
26: /**
27: * Constructor
28: */
29: public TagUtils() {
30: }
31:
32: /**
33: * @return True, if tag name equals '<body ...>'
34: *
35: * @param tag
36: */
37: public static final boolean isBodyTag(final ComponentTag tag) {
38: return ("body".equalsIgnoreCase(tag.getName()) && (tag
39: .getNamespace() == null));
40: }
41:
42: /**
43: * @return True, if tag name equals '<head ...>'
44: *
45: * @param tag
46: */
47: public static final boolean isHeadTag(final ComponentTag tag) {
48: return ("head".equalsIgnoreCase(tag.getName()) && (tag
49: .getNamespace() == null));
50: }
51: }
|