src/share/classes/com/sun/tools/jdi/ConnectorImpl.java

Print this page




 127         }
 128         return messages.getString(key);
 129     }
 130 
 131     public String toString() {
 132         String string = name() + " (defaults: ";
 133         Iterator<Argument> iter = defaultArguments().values().iterator();
 134         boolean first = true;
 135         while (iter.hasNext()) {
 136             ArgumentImpl argument = (ArgumentImpl)iter.next();
 137             if (!first) {
 138                 string += ", ";
 139             }
 140             string += argument.toString();
 141             first = false;
 142         }
 143         string += ")";
 144         return string;
 145     }
 146 

 147     abstract class ArgumentImpl implements Connector.Argument, Cloneable, Serializable {
 148         private String name;
 149         private String label;
 150         private String description;
 151         private String value;
 152         private boolean mustSpecify;
 153 
 154         ArgumentImpl(String name, String label, String description,
 155                      String value,
 156                      boolean mustSpecify) {
 157             this.name = name;
 158             this.label = label;
 159             this.description = description;
 160             this.value = value;
 161             this.mustSpecify = mustSpecify;
 162         }
 163 
 164         public abstract boolean isValid(String value);
 165 
 166         public String name() {




 127         }
 128         return messages.getString(key);
 129     }
 130 
 131     public String toString() {
 132         String string = name() + " (defaults: ";
 133         Iterator<Argument> iter = defaultArguments().values().iterator();
 134         boolean first = true;
 135         while (iter.hasNext()) {
 136             ArgumentImpl argument = (ArgumentImpl)iter.next();
 137             if (!first) {
 138                 string += ", ";
 139             }
 140             string += argument.toString();
 141             first = false;
 142         }
 143         string += ")";
 144         return string;
 145     }
 146 
 147     @SuppressWarnings("serial") // JDK implementation class
 148     abstract class ArgumentImpl implements Connector.Argument, Cloneable, Serializable {
 149         private String name;
 150         private String label;
 151         private String description;
 152         private String value;
 153         private boolean mustSpecify;
 154 
 155         ArgumentImpl(String name, String label, String description,
 156                      String value,
 157                      boolean mustSpecify) {
 158             this.name = name;
 159             this.label = label;
 160             this.description = description;
 161             this.value = value;
 162             this.mustSpecify = mustSpecify;
 163         }
 164 
 165         public abstract boolean isValid(String value);
 166 
 167         public String name() {