001: /*
002: * JBoss, Home of Professional Open Source.
003: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004: * as indicated by the @author tags. See the copyright.txt file in the
005: * distribution for a full listing of individual contributors.
006: *
007: * This is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU Lesser General Public License as
009: * published by the Free Software Foundation; either version 2.1 of
010: * the License, or (at your option) any later version.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this software; if not, write to the Free
019: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021: */
022: package org.jboss.test.xml.multispaced;
023:
024: /**
025: * @version <tt>$Revision: 57211 $</tt>
026: * @author <a href="mailto:alex@jboss.org">Alexey Loubyansky</a>
027: */
028: public class XMBeanAttributeMetaData {
029: private String access;
030: private String getMethod;
031: private String setMethod;
032: private String description;
033: private String name;
034: private String type;
035:
036: public String getAccess() {
037: return access;
038: }
039:
040: public void setAccess(String access) {
041: this .access = access;
042: }
043:
044: public String getGetMethod() {
045: return getMethod;
046: }
047:
048: public void setGetMethod(String getMethod) {
049: this .getMethod = getMethod;
050: }
051:
052: public String getSetMethod() {
053: return setMethod;
054: }
055:
056: public void setSetMethod(String setMethod) {
057: this .setMethod = setMethod;
058: }
059:
060: public String getDescription() {
061: return description;
062: }
063:
064: public void setDescription(String description) {
065: this .description = description;
066: }
067:
068: public String getName() {
069: return name;
070: }
071:
072: public void setName(String name) {
073: this .name = name;
074: }
075:
076: public String getType() {
077: return type;
078: }
079:
080: public void setType(String type) {
081: this .type = type;
082: }
083:
084: public String toString() {
085: return "[description=" + description + ", access=" + access
086: + ", getMethod=" + getMethod + ", setMethod="
087: + setMethod + ", name=" + name + ", type=" + type + ']';
088: }
089:
090: public boolean equals(Object o) {
091: if (this == o)
092: return true;
093: if (!(o instanceof XMBeanAttributeMetaData))
094: return false;
095:
096: final XMBeanAttributeMetaData mBeanAttributeMetaData = (XMBeanAttributeMetaData) o;
097:
098: if (access != null ? !access
099: .equals(mBeanAttributeMetaData.access)
100: : mBeanAttributeMetaData.access != null)
101: return false;
102: if (description != null ? !description
103: .equals(mBeanAttributeMetaData.description)
104: : mBeanAttributeMetaData.description != null)
105: return false;
106: if (getMethod != null ? !getMethod
107: .equals(mBeanAttributeMetaData.getMethod)
108: : mBeanAttributeMetaData.getMethod != null)
109: return false;
110: if (name != null ? !name.equals(mBeanAttributeMetaData.name)
111: : mBeanAttributeMetaData.name != null)
112: return false;
113: if (setMethod != null ? !setMethod
114: .equals(mBeanAttributeMetaData.setMethod)
115: : mBeanAttributeMetaData.setMethod != null)
116: return false;
117: if (type != null ? !type.equals(mBeanAttributeMetaData.type)
118: : mBeanAttributeMetaData.type != null)
119: return false;
120:
121: return true;
122: }
123:
124: public int hashCode() {
125: int result;
126: result = (access != null ? access.hashCode() : 0);
127: result = 29 * result
128: + (getMethod != null ? getMethod.hashCode() : 0);
129: result = 29 * result
130: + (setMethod != null ? setMethod.hashCode() : 0);
131: result = 29 * result
132: + (description != null ? description.hashCode() : 0);
133: result = 29 * result + (name != null ? name.hashCode() : 0);
134: result = 29 * result + (type != null ? type.hashCode() : 0);
135: return result;
136: }
137: }
|