1 package org.jbpm.bpel.wsdl.impl; 2 3 import javax.xml.namespace.QName ; 4 5 10 public class NamedExtension extends AbstractExtension { 11 12 private QName name; 13 14 private static final long serialVersionUID = 1L; 15 16 20 public QName getQName() { 21 return name; 22 } 23 24 28 public void setQName(QName name) { 29 this.name = name; 30 } 31 32 43 public boolean equals(Object obj) { 44 boolean equals; 45 if (obj instanceof NamedExtension) { 46 NamedExtension extension = (NamedExtension) obj; 47 equals = getQName().equals(extension.getQName()) && getElementType().equals(extension.getElementType()); 48 } 49 else { 50 equals = false; 51 } 52 return equals; 53 } 54 55 60 public int hashCode() { 61 return getElementType().hashCode() ^ getQName().hashCode(); 62 } 63 64 public String toString() { 65 QName elementType = getElementType(); 66 return "<" + elementType.getPrefix() + ":" + elementType.getLocalPart() 67 + " name='" + getQName() + "'/>"; 68 } 69 } 70 | Popular Tags |