1 22 23 package org.objectweb.petals.tools.jbicommon.descriptor; 24 25 import javax.xml.namespace.QName ; 26 27 import org.apache.commons.lang.builder.EqualsBuilder; 28 import org.apache.commons.lang.builder.HashCodeBuilder; 29 import org.apache.commons.lang.builder.ToStringBuilder; 30 31 46 public class Provides extends ExtensibleJbiElement { 47 48 51 private String endpointName; 52 53 56 private QName interfaceName; 57 58 61 private QName serviceName; 62 63 66 public Provides() { super(); 68 } 69 70 @Override 71 public boolean equals(final Object other) { 72 if (!(other instanceof Provides)) { 73 return false; } 75 Provides castOther = (Provides) other; 76 return new EqualsBuilder().append(endpointName, castOther.endpointName) 77 .append(interfaceName, castOther.interfaceName).append( 78 serviceName, castOther.serviceName).isEquals(); 79 } 80 81 87 public String getEndpointName() { 88 return endpointName; 89 } 90 91 96 public QName getInterfaceName() { 97 return interfaceName; 98 } 99 100 106 public QName getServiceName() { 107 return serviceName; 108 } 109 110 114 @Override 115 public int hashCode() { 116 return new HashCodeBuilder().append(endpointName).append(interfaceName) 117 .append(serviceName).toHashCode(); 118 } 119 120 @Override 121 public String toString() { 122 return new ToStringBuilder(this).append("endpointName", endpointName) 123 .append("interfaceName", interfaceName).append("serviceName", 124 serviceName).toString(); 125 } 126 127 133 void setEndpointName(final String endpointName) { 134 this.endpointName = endpointName; 135 } 136 137 143 void setInterfaceName(final QName interfaceName) { 144 this.interfaceName = interfaceName; 145 } 146 147 153 void setServiceName(final QName serviceName) { 154 this.serviceName = serviceName; 155 } 156 } 157 | Popular Tags |