KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > google > gwt > xml > client > impl > AttrImpl


1 /*
2  * Copyright 2006 Google Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5  * use this file except in compliance with the License. You may obtain a copy of
6  * 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, WITHOUT
12  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13  * License for the specific language governing permissions and limitations under
14  * the License.
15  */

16 package com.google.gwt.xml.client.impl;
17
18 import com.google.gwt.core.client.JavaScriptObject;
19 import com.google.gwt.xml.client.Attr;
20
21 /**
22  * This class implements the XML Attr interface.
23  */

24 class AttrImpl extends NodeImpl implements Attr {
25   protected AttrImpl(JavaScriptObject o) {
26     super(o);
27   }
28
29   /**
30    * This function delegates to the native method <code>getName</code> in
31    * XMLParserImpl.
32    */

33   public String JavaDoc getName() {
34     return XMLParserImpl.getName(this.getJsObject());
35   }
36
37   /**
38    * This function delegates to the native method <code>getSpecified</code> in
39    * XMLParserImpl.
40    */

41   public boolean getSpecified() {
42     return XMLParserImpl.getSpecified(this.getJsObject());
43   }
44
45   /**
46    * This function delegates to the native method <code>getValue</code> in
47    * XMLParserImpl.
48    */

49   public String JavaDoc getValue() {
50     return XMLParserImpl.getValue(this.getJsObject());
51   }
52
53   /**
54    * This method returns the string representation of this <code>Attr</code>.
55    * @return the string representation of this <code>Attr</code>.
56    * @see java.lang.Object#toString()
57    */

58   public String JavaDoc toString() {
59     final StringBuffer JavaDoc b = new StringBuffer JavaDoc();
60     b.append(" " + getName());
61     b.append("=\"");
62     b.append(getValue());
63     b.append("\"");
64     return b.toString();
65   }
66 }
67
Popular Tags