JAL-3438 spotless for 2.11.2.0
[jalview.git] / src / ext / vamsas / ServiceHandles.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3  * Copyright (C) $$Year-Rel$$ The Jalview Authors
4  * 
5  * This file is part of Jalview.
6  * 
7  * Jalview is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License 
9  * as published by the Free Software Foundation, either version 3
10  * of the License, or (at your option) any later version.
11  *  
12  * Jalview is distributed in the hope that it will be useful, but 
13  * WITHOUT ANY WARRANTY; without even the implied warranty 
14  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
15  * PURPOSE.  See the GNU General Public License for more details.
16  * 
17  * You should have received a copy of the GNU General Public License
18  * along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
19  * The Jalview Authors are detailed in the 'AUTHORS' file.
20  */
21 package ext.vamsas;
22
23 public class ServiceHandles implements java.io.Serializable
24 {
25   private ext.vamsas.ServiceHandle[] services;
26
27   public ServiceHandles()
28   {
29   }
30
31   public ServiceHandles(ext.vamsas.ServiceHandle[] services)
32   {
33     this.services = services;
34   }
35
36   /**
37    * Gets the services value for this ServiceHandles.
38    * 
39    * @return services
40    */
41   public ext.vamsas.ServiceHandle[] getServices()
42   {
43     return services;
44   }
45
46   /**
47    * Sets the services value for this ServiceHandles.
48    * 
49    * @param services
50    */
51   public void setServices(ext.vamsas.ServiceHandle[] services)
52   {
53     this.services = services;
54   }
55
56   private java.lang.Object __equalsCalc = null;
57
58   public synchronized boolean equals(java.lang.Object obj)
59   {
60     if (obj == null)
61     {
62       return false;
63     }
64     if (!(obj instanceof ServiceHandles))
65     {
66       return false;
67     }
68     ServiceHandles other = (ServiceHandles) obj;
69     if (this == obj)
70     {
71       return true;
72     }
73     if (__equalsCalc != null)
74     {
75       return (__equalsCalc == obj);
76     }
77     __equalsCalc = obj;
78     boolean _equals;
79     _equals = true
80             && ((this.services == null && other.getServices() == null)
81                     || (this.services != null && java.util.Arrays
82                             .equals(this.services, other.getServices())));
83     __equalsCalc = null;
84     return _equals;
85   }
86
87   private boolean __hashCodeCalc = false;
88
89   public synchronized int hashCode()
90   {
91     if (__hashCodeCalc)
92     {
93       return 0;
94     }
95     __hashCodeCalc = true;
96     int _hashCode = 1;
97     if (getServices() != null)
98     {
99       for (int i = 0; i < java.lang.reflect.Array
100               .getLength(getServices()); i++)
101       {
102         java.lang.Object obj = java.lang.reflect.Array.get(getServices(),
103                 i);
104         if (obj != null && !obj.getClass().isArray())
105         {
106           _hashCode += obj.hashCode();
107         }
108       }
109     }
110     __hashCodeCalc = false;
111     return _hashCode;
112   }
113
114   // Type metadata
115   private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(
116           ServiceHandles.class, true);
117
118   static
119   {
120     typeDesc.setXmlType(new javax.xml.namespace.QName(
121             "registry.objects.vamsas", "ServiceHandles"));
122     org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
123     elemField.setFieldName("services");
124     elemField.setXmlName(new javax.xml.namespace.QName("", "services"));
125     elemField.setXmlType(new javax.xml.namespace.QName(
126             "registry.objects.vamsas", "ServiceHandle"));
127     typeDesc.addFieldDesc(elemField);
128   }
129
130   /**
131    * Return type metadata object
132    */
133   public static org.apache.axis.description.TypeDesc getTypeDesc()
134   {
135     return typeDesc;
136   }
137
138   /**
139    * Get Custom Serializer
140    */
141   public static org.apache.axis.encoding.Serializer getSerializer(
142           java.lang.String mechType, java.lang.Class _javaType,
143           javax.xml.namespace.QName _xmlType)
144   {
145     return new org.apache.axis.encoding.ser.BeanSerializer(_javaType,
146             _xmlType, typeDesc);
147   }
148
149   /**
150    * Get Custom Deserializer
151    */
152   public static org.apache.axis.encoding.Deserializer getDeserializer(
153           java.lang.String mechType, java.lang.Class _javaType,
154           javax.xml.namespace.QName _xmlType)
155   {
156     return new org.apache.axis.encoding.ser.BeanDeserializer(_javaType,
157             _xmlType, typeDesc);
158   }
159
160 }