KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > test > xml > multispaced > XMBeanMetaData


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.test.xml.multispaced;
8
9 import java.util.List JavaDoc;
10 import java.util.ArrayList JavaDoc;
11
12 /**
13  * @version <tt>$Revision: 1.1 $</tt>
14  * @author <a HREF="mailto:alex@jboss.org">Alexey Loubyansky</a>
15  */

16 public class XMBeanMetaData
17 {
18    private String JavaDoc description;
19    private String JavaDoc mbeanClass;
20    private List JavaDoc constructors = new ArrayList JavaDoc();
21    private List JavaDoc attributes = new ArrayList JavaDoc();
22    private List JavaDoc operations = new ArrayList JavaDoc();
23    private List JavaDoc notifications = new ArrayList JavaDoc();
24
25    private Object JavaDoc persistenceManager;
26
27    public String JavaDoc getDescription()
28    {
29       return description;
30    }
31
32    public void setDescription(String JavaDoc description)
33    {
34       this.description = description;
35    }
36
37    public String JavaDoc getMbeanClass()
38    {
39       return mbeanClass;
40    }
41
42    public void setMbeanClass(String JavaDoc mbeanClass)
43    {
44       this.mbeanClass = mbeanClass;
45    }
46
47    public List JavaDoc getConstructors()
48    {
49       return constructors;
50    }
51
52    public void addConstructor(XMBeanConstructorMetaData constructor)
53    {
54       constructors.add(constructor);
55    }
56
57    public List JavaDoc getAttributes()
58    {
59       return attributes;
60    }
61
62    public void addAttribute(XMBeanAttributeMetaData attribute)
63    {
64       attributes.add(attribute);
65    }
66
67    public List JavaDoc getOperations()
68    {
69       return operations;
70    }
71
72    public void addOperation(XMBeanOperationMetaData operation)
73    {
74       operations.add(operation);
75    }
76
77    public List JavaDoc getNotifications()
78    {
79       return notifications;
80    }
81
82    public void addNotification(XMBeanNotificationMetaData notification)
83    {
84       notifications.add(notification);
85    }
86
87    public Object JavaDoc getPersistenceManager()
88    {
89       return persistenceManager;
90    }
91
92    public void setPersistenceManager(Object JavaDoc persistenceManager)
93    {
94       this.persistenceManager = persistenceManager;
95    }
96
97    public String JavaDoc toString()
98    {
99       return
100          "[description=" + description +
101          ", mbeanClass=" + mbeanClass +
102          ", constructors=" + constructors +
103          ", attributes=" + attributes +
104          ", operations=" + operations +
105          ", notifications=" + notifications +
106          ", persistence-manager=" + persistenceManager + ']';
107    }
108
109    public boolean equals(Object JavaDoc o)
110    {
111       if(this == o) return true;
112       if(!(o instanceof XMBeanMetaData)) return false;
113
114       final XMBeanMetaData xmBeanMetaData = (XMBeanMetaData)o;
115
116       if(attributes != null ? !attributes.equals(xmBeanMetaData.attributes) : xmBeanMetaData.attributes != null) return false;
117       if(constructors != null ? !constructors.equals(xmBeanMetaData.constructors) : xmBeanMetaData.constructors != null) return false;
118       if(description != null ? !description.equals(xmBeanMetaData.description) : xmBeanMetaData.description != null) return false;
119       if(mbeanClass != null ? !mbeanClass.equals(xmBeanMetaData.mbeanClass) : xmBeanMetaData.mbeanClass != null) return false;
120       if(notifications != null ? !notifications.equals(xmBeanMetaData.notifications) : xmBeanMetaData.notifications != null) return false;
121       if(operations != null ? !operations.equals(xmBeanMetaData.operations) : xmBeanMetaData.operations != null) return false;
122       if(persistenceManager != null ? !persistenceManager.equals(xmBeanMetaData.persistenceManager) : xmBeanMetaData.persistenceManager != null) return false;
123
124       return true;
125    }
126
127    public int hashCode()
128    {
129       int result;
130       result = (description != null ? description.hashCode() : 0);
131       result = 29 * result + (mbeanClass != null ? mbeanClass.hashCode() : 0);
132       result = 29 * result + (constructors != null ? constructors.hashCode() : 0);
133       result = 29 * result + (attributes != null ? attributes.hashCode() : 0);
134       result = 29 * result + (operations != null ? operations.hashCode() : 0);
135       result = 29 * result + (notifications != null ? notifications.hashCode() : 0);
136       result = 29 * result + (persistenceManager != null ? persistenceManager.hashCode() : 0);
137       return result;
138    }
139 }
140
Popular Tags