1 16 17 18 package org.apache.commons.modeler; 19 20 21 import java.io.Serializable ; 22 23 import javax.management.MBeanParameterInfo ; 24 25 26 33 34 public class ParameterInfo extends FeatureInfo implements Serializable { 35 static final long serialVersionUID = 2222796006787664020L; 36 38 39 42 public ParameterInfo() { 43 44 super(); 45 46 } 47 48 49 56 public ParameterInfo(String name, String type, String description) { 57 58 super(); 59 setName(name); 60 setType(type); 61 setDescription(description); 62 63 } 64 65 66 68 69 73 transient MBeanParameterInfo info = null; 74 protected String type = null; 75 76 78 79 84 public void setDescription(String description) { 85 super.setDescription(description); 86 this.info = null; 87 } 88 89 90 95 public void setName(String name) { 96 super.setName(name); 97 this.info = null; 98 } 99 100 101 104 public String getType() { 105 return (this.type); 106 } 107 108 public void setType(String type) { 109 this.type = type; 110 this.info = null; 111 } 112 113 114 116 117 121 public MBeanParameterInfo createParameterInfo() { 122 123 if (info != null) 125 return (info); 126 127 info = new MBeanParameterInfo 129 (getName(), getType(), getDescription()); 130 return (info); 131 132 } 133 134 135 138 public String toString() { 139 140 StringBuffer sb = new StringBuffer ("ParameterInfo["); 141 sb.append("name="); 142 sb.append(name); 143 sb.append(", description="); 144 sb.append(description); 145 sb.append(", type="); 146 sb.append(type); 147 sb.append("]"); 148 return (sb.toString()); 149 150 } 151 } 152 | Popular Tags |