package javax.management;
public class MBeanParameterInfo extends MBeanFeatureInfo
implements java.io.Serializable, Cloneable
{
private static final long serialVersionUID = 7432616882776782338L;
private String type = null;
private transient String cacheString;
private transient int cacheHashCode;
public MBeanParameterInfo(java.lang.String name, java.lang.String type, java.lang.String description)
throws IllegalArgumentException
{
super(name, description);
this.type = type;
}
public java.lang.String getType()
{
return type;
}
public boolean equals(Object object)
{
if (this == object)
return true;
if (object == null || (object instanceof MBeanParameterInfo) == false)
return false;
MBeanParameterInfo other = (MBeanParameterInfo) object;
if (super.equals(other) == false)
return false;
if (this.getType().equals(other.getType()) == false)
return false;
return true;
}
public int hashCode()
{
if (cacheHashCode == 0)
{
cacheHashCode = super.hashCode();
cacheHashCode += getType().hashCode();
}
return cacheHashCode;
}
public String toString()
{
if (cacheString == null)
{
StringBuffer buffer = new StringBuffer(100);
buffer.append(getClass().getName()).append(":");
buffer.append(" name=").append(getName());
buffer.append(" description=").append(getDescription());
buffer.append(" type=").append(getType());
cacheString = buffer.toString();
}
return cacheString;
}
public Object clone()
{
MBeanParameterInfo clone = null;
try
{
clone = (MBeanParameterInfo) super.clone();
clone.type = getType();
}
catch(CloneNotSupportedException e)
{
}
return clone;
}
}