KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ant > internal > ui > dtd > schema > Atom


1 /*******************************************************************************
2  * Copyright (c) 2002, 2005 Object Factory Inc.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * Object Factory Inc. - Initial implementation
10  *******************************************************************************/

11 package org.eclipse.ant.internal.ui.dtd.schema;
12
13 import org.eclipse.ant.internal.ui.dtd.IAtom;
14
15 /**
16  * Atom contains information common to elements and attributes.
17  * @author Bob Foster
18  */

19 public class Atom implements IAtom {
20     
21     protected String JavaDoc fName;
22     protected int fKind;
23
24     protected Atom(int kind, String JavaDoc name) {
25         fKind = kind;
26         fName = name.intern();
27     }
28     
29     /* (non-Javadoc)
30      * @see org.eclipse.ant.internal.ui.dtd.IAtom#getName()
31      */

32     public String JavaDoc getName() {
33         return fName;
34     }
35     
36     /* (non-Javadoc)
37      * @see java.lang.Object#toString()
38      */

39     public String JavaDoc toString() {
40         return fName;
41     }
42 }
43
Popular Tags