1 7 package org.jboss.test.xml.multispaced; 8 9 import java.util.List ; 10 import java.util.ArrayList ; 11 12 16 public class XMBeanMetaData 17 { 18 private String description; 19 private String mbeanClass; 20 private List constructors = new ArrayList (); 21 private List attributes = new ArrayList (); 22 private List operations = new ArrayList (); 23 private List notifications = new ArrayList (); 24 25 private Object persistenceManager; 26 27 public String getDescription() 28 { 29 return description; 30 } 31 32 public void setDescription(String description) 33 { 34 this.description = description; 35 } 36 37 public String getMbeanClass() 38 { 39 return mbeanClass; 40 } 41 42 public void setMbeanClass(String mbeanClass) 43 { 44 this.mbeanClass = mbeanClass; 45 } 46 47 public List getConstructors() 48 { 49 return constructors; 50 } 51 52 public void addConstructor(XMBeanConstructorMetaData constructor) 53 { 54 constructors.add(constructor); 55 } 56 57 public List getAttributes() 58 { 59 return attributes; 60 } 61 62 public void addAttribute(XMBeanAttributeMetaData attribute) 63 { 64 attributes.add(attribute); 65 } 66 67 public List getOperations() 68 { 69 return operations; 70 } 71 72 public void addOperation(XMBeanOperationMetaData operation) 73 { 74 operations.add(operation); 75 } 76 77 public List getNotifications() 78 { 79 return notifications; 80 } 81 82 public void addNotification(XMBeanNotificationMetaData notification) 83 { 84 notifications.add(notification); 85 } 86 87 public Object getPersistenceManager() 88 { 89 return persistenceManager; 90 } 91 92 public void setPersistenceManager(Object persistenceManager) 93 { 94 this.persistenceManager = persistenceManager; 95 } 96 97 public String 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 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 |