javax.management
public class: MBeanFeatureInfo [javadoc |
source]
java.lang.Object
javax.management.MBeanFeatureInfo
All Implemented Interfaces:
DescriptorRead, Serializable
Direct Known Subclasses:
MBeanNotificationInfo, ModelMBeanAttributeInfo, OpenMBeanParameterInfoSupport, MBeanParameterInfo, ModelMBeanConstructorInfo, ModelMBeanOperationInfo, MBeanConstructorInfo, OpenMBeanConstructorInfoSupport, MBeanAttributeInfo, OpenMBeanOperationInfoSupport, MBeanOperationInfo, ModelMBeanNotificationInfo, OpenMBeanAttributeInfoSupport
Provides general information for an MBean descriptor object.
The feature described can be an attribute, an operation, a
parameter, or a notification. Instances of this class are
immutable. Subclasses may be mutable but this is not
recommended.
Field Summary |
---|
static final long | serialVersionUID | |
protected String | name | The name of the feature. It is recommended that subclasses call
#getName rather than reading this field, and that they
not change it.- serial:
The - name of the feature.
|
protected String | description | The human-readable description of the feature. It is
recommended that subclasses call #getDescription rather
than reading this field, and that they not change it.- serial:
The - human-readable description of the feature.
|
Constructor: |
public MBeanFeatureInfo(String name,
String description) {
this(name, description, null);
}
Constructs an MBeanFeatureInfo object. This
constructor is equivalent to {@code MBeanFeatureInfo(name,
description, (Descriptor) null}. Parameters:
name - The name of the feature.
description - A human readable description of the feature.
|
public MBeanFeatureInfo(String name,
String description,
Descriptor descriptor) {
this.name = name;
this.description = description;
this.descriptor = descriptor;
}
Constructs an MBeanFeatureInfo object. Parameters:
name - The name of the feature.
description - A human readable description of the feature.
descriptor - The descriptor for the feature. This may be null
which is equivalent to an empty descriptor.
- since:
1.6 -
|
Methods from java.lang.Object: |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method from javax.management.MBeanFeatureInfo Detail: |
public boolean equals(Object o) {
if (o == this)
return true;
if (!(o instanceof MBeanFeatureInfo))
return false;
MBeanFeatureInfo p = (MBeanFeatureInfo) o;
return (p.getName().equals(getName()) &&
p.getDescription().equals(getDescription()) &&
p.getDescriptor().equals(getDescriptor()));
}
Compare this MBeanFeatureInfo to another. |
public String getDescription() {
return description;
}
Returns the human-readable description of the feature. |
public Descriptor getDescriptor() {
return (Descriptor) ImmutableDescriptor.nonNullDescriptor(descriptor).clone();
}
Returns the descriptor for the feature. Changing the returned value
will have no affect on the original descriptor. |
public String getName() {
return name;
}
Returns the name of the feature. |
public int hashCode() {
return getName().hashCode() ^ getDescription().hashCode() ^
getDescriptor().hashCode();
}
|