KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > xml > xam > TestAttribute


1 package org.netbeans.modules.xml.xam;
2
3 import org.netbeans.modules.xml.xam.dom.Attribute;
4
5 /**
6  *
7  * @author Nam Nguyen
8  */

9 public enum TestAttribute implements Attribute {
10     INDEX("index", Integer JavaDoc.class),
11     VALUE("value", String JavaDoc.class),
12     TNS("targetNamespace", String JavaDoc.class),
13     NAME("name", String JavaDoc.class),
14     REF("ref", String JavaDoc.class);
15
16     private String JavaDoc name;
17     private Class JavaDoc type;
18     private Class JavaDoc subtype;
19     
20     TestAttribute(String JavaDoc name, Class JavaDoc type) {
21         this.name = name;
22         this.type = type;
23     }
24     TestAttribute(String JavaDoc name, Class JavaDoc type, Class JavaDoc subtype) {
25         this(name, type);
26         this.subtype = subtype;
27     }
28     
29     public String JavaDoc getName() { return name; }
30     public Class JavaDoc getType() { return type; }
31     public Class JavaDoc getMemberType() { return subtype; }
32     public String JavaDoc toString() { return name; }
33 }
34
Popular Tags