| Method from org.apache.commons.modeler.ConstructorInfo Detail: |
public void addParameter(ParameterInfo parameter) {
synchronized (parameters) {
ParameterInfo results[] = new ParameterInfo[parameters.length + 1];
System.arraycopy(parameters, 0, results, 0, parameters.length);
results[parameters.length] = parameter;
parameters = results;
this.info = null;
}
}
Add a new parameter to the set of parameters for this constructor. |
public ModelMBeanConstructorInfo createConstructorInfo() {
// Return our cached information (if any)
if (info != null)
return (info);
// Create and return a new information object
ParameterInfo params[] = getSignature();
MBeanParameterInfo parameters[] =
new MBeanParameterInfo[params.length];
for (int i = 0; i < params.length; i++)
parameters[i] = params[i].createParameterInfo();
info = new ModelMBeanConstructorInfo
(getName(), getDescription(), parameters);
Descriptor descriptor = info.getDescriptor();
descriptor.removeField("class");
if (getDisplayName() != null)
descriptor.setField("displayName", getDisplayName());
addFields(descriptor);
info.setDescriptor(descriptor);
return (info);
}
Create and return a ModelMBeanConstructorInfo object that
corresponds to the attribute described by this instance. |
public String getDisplayName() {
return (this.displayName);
}
The display name of this attribute. |
public ParameterInfo[] getSignature() {
return (this.parameters);
}
The set of parameters for this constructor. |
public void setDescription(String description) {
// ------------------------------------------------------------- Properties
super.setDescription(description);
this.info = null;
}
Override the description property setter. |
public void setDisplayName(String displayName) {
this.displayName = displayName;
}
|
public void setName(String name) {
super.setName(name);
this.info = null;
}
Override the name property setter. |
public String toString() {
StringBuffer sb = new StringBuffer("ConstructorInfo[");
sb.append("name=");
sb.append(name);
sb.append(", description=");
sb.append(description);
sb.append(", parameters=");
sb.append(parameters.length);
sb.append("]");
return (sb.toString());
}
Return a string representation of this constructor descriptor. |