1 10 11 package org.mule.impl.container; 12 13 public class DescriptorContainerKeyPair extends ContainerKeyPair 14 { 15 private String descriptorName; 16 17 public DescriptorContainerKeyPair(String descriptorName, Object key) 18 { 19 super(DescriptorContainerContext.DESCRIPTOR_CONTAINER_NAME, key); 20 this.descriptorName = descriptorName; 21 } 22 23 public String getDescriptorName() 24 { 25 return descriptorName; 26 } 27 28 public String toFullString() 29 { 30 return "Descriptor Container Key{name=" + descriptorName + ", key=" + getKey().toString() 31 + ", container=" + getContainerName() + ", required=" + isRequired() + "}"; 32 } 33 34 public boolean equals(Object o) 35 { 36 if (this == o) return true; 37 if (o == null || getClass() != o.getClass()) return false; 38 if (!super.equals(o)) return false; 39 40 final DescriptorContainerKeyPair that = (DescriptorContainerKeyPair)o; 41 42 if (descriptorName != null 43 ? !descriptorName.equals(that.descriptorName) : that.descriptorName != null) 44 return false; 45 46 return true; 47 } 48 49 public int hashCode() 50 { 51 return 29 * super.hashCode() + (descriptorName != null ? descriptorName.hashCode() : 0); 52 } 53 } 54 | Popular Tags |