01: /*
02: * The contents of this file are subject to the terms of the Common Development
03: * and Distribution License (the License). You may not use this file except in
04: * compliance with the License.
05: *
06: * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
07: * or http://www.netbeans.org/cddl.txt.
08: *
09: * When distributing Covered Code, include this CDDL Header Notice in each file
10: * and include the License file at http://www.netbeans.org/cddl.txt.
11: * If applicable, add the following below the CDDL Header, with the fields
12: * enclosed by brackets [] replaced by your own identifying information:
13: * "Portions Copyrighted [year] [name of copyright owner]"
14: *
15: * The Original Software is NetBeans. The Initial Developer of the Original
16: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
17: * Microsystems, Inc. All Rights Reserved.
18: */
19:
20: package org.netbeans.modules.wsdlextensions.snmp.impl;
21:
22: import org.netbeans.modules.xml.xam.dom.Attribute;
23:
24: import org.netbeans.modules.wsdlextensions.snmp.SNMPAddress;
25: import org.netbeans.modules.wsdlextensions.snmp.SNMPMessage;
26: import org.netbeans.modules.wsdlextensions.snmp.SNMPOperation;
27:
28: public enum SNMPAttribute implements Attribute {
29: SNMP_ADDRESS_PORT(SNMPAddress.ATTR_PORT),
30:
31: SNMP_OPERATION_TYPE(SNMPOperation.ATTR_TYPE), SNMP_OPERATION_MOF_ID(
32: SNMPOperation.ATTR_MOF_ID), SNMP_OPERATION_ADAPTATION_ID(
33: SNMPOperation.ATTR_ADAPTATION_ID), SNMP_OPERATION_MOF_ID_REF(
34: SNMPOperation.ATTR_MOF_ID_REF), SNMP_MESSAGE_TRAP_TYPE(
35: SNMPMessage.ATTR_TRAPPART);
36:
37: private String name;
38:
39: private Class type;
40: private Class subtype;
41:
42: SNMPAttribute(String name) {
43: this (name, String.class);
44: }
45:
46: SNMPAttribute(String name, Class type) {
47: this (name, type, null);
48: }
49:
50: SNMPAttribute(String name, Class type, Class subtype) {
51: this .name = name;
52: this .type = type;
53: this .subtype = subtype;
54: }
55:
56: public String toString() {
57: return name;
58: }
59:
60: public Class getType() {
61: return type;
62: }
63:
64: public String getName() {
65: return name;
66: }
67:
68: public Class getMemberType() {
69: return subtype;
70: }
71: }
|