1 16 17 18 package org.apache.commons.modeler; 19 20 21 import java.io.Serializable ; 22 import java.util.ArrayList ; 23 import java.util.Iterator ; 24 import java.util.List ; 25 26 import javax.management.Descriptor ; 27 28 29 38 39 public class FeatureInfo implements Serializable { 40 static final long serialVersionUID = -911529176124712296L; 41 protected String description = null; 42 protected List fields = new ArrayList (); 43 protected String name = null; 44 45 47 48 51 public String getDescription() { 52 return (this.description); 53 } 54 55 public void setDescription(String description) { 56 this.description = description; 57 } 58 59 60 63 public List getFields() { 64 return (fields); 65 } 66 67 68 72 public String getName() { 73 return (this.name); 74 } 75 76 public void setName(String name) { 77 this.name = name; 78 } 79 80 81 83 84 90 public void addField(FieldInfo field) { 91 fields.add(field); 92 } 93 94 95 97 98 104 protected void addFields(Descriptor descriptor) { 105 106 Iterator items = getFields().iterator(); 107 while (items.hasNext()) { 108 FieldInfo item = (FieldInfo) items.next(); 109 descriptor.setField(item.getName(), item.getValue()); 110 } 111 112 } 113 114 115 } 116 | Popular Tags |