Parameterpublic class Parameter extends org.netbeans.modules.schema2beans.BaseBean
Fields Summary |
---|
static Vector | comparators | public static final String | NAME | public static final String | VALUE |
Constructors Summary |
---|
public Parameter() // NOI18N
this(Common.USE_DEFAULT_VALUES);
| public Parameter(int options)
super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0));
// Properties (see root bean comments for the bean graph)
this.createProperty("name", // NOI18N
NAME,
Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY,
String.class);
this.createProperty("value", // NOI18N
VALUE,
Common.TYPE_1_N | Common.TYPE_STRING | Common.TYPE_KEY,
String.class);
this.initialize(options);
|
Methods Summary |
---|
public static void | addComparator(org.netbeans.modules.schema2beans.BeanComparator c)
comparators.add(c);
| public int | addValue(java.lang.String value)
return this.addValue(VALUE, value);
| public void | dump(java.lang.StringBuffer str, java.lang.String indent)
String s;
Object o;
org.netbeans.modules.schema2beans.BaseBean n;
str.append(indent);
str.append("Name"); // NOI18N
str.append(indent+"\t"); // NOI18N
str.append("<"); // NOI18N
s = this.getName();
str.append((s==null?"null":s.trim())); // NOI18N
str.append(">\n"); // NOI18N
this.dumpAttributes(NAME, 0, str, indent);
str.append(indent);
str.append("Value["+this.sizeValue()+"]"); // NOI18N
for(int i=0; i<this.sizeValue(); i++)
{
str.append(indent+"\t");
str.append("#"+i+":");
str.append(indent+"\t"); // NOI18N
str.append("<"); // NOI18N
s = this.getValue(i);
str.append((s==null?"null":s.trim())); // NOI18N
str.append(">\n"); // NOI18N
this.dumpAttributes(VALUE, i, str, indent);
}
| public java.lang.String | dumpBeanNode()
StringBuffer str = new StringBuffer();
str.append("Parameter\n"); // NOI18N
this.dump(str, "\n "); // NOI18N
return str.toString();
| public java.lang.String | getName()
return (String)this.getValue(NAME);
| public java.lang.String | getValue(int index)
return (String)this.getValue(VALUE, index);
| public java.lang.String[] | getValue()
return (String[])this.getValues(VALUE);
| void | initialize(int options)
| public static void | removeComparator(org.netbeans.modules.schema2beans.BeanComparator c)
comparators.remove(c);
| public int | removeValue(java.lang.String value)
return this.removeValue(VALUE, value);
| public void | setName(java.lang.String value)
this.setValue(NAME, value);
| public void | setValue(int index, java.lang.String value)
this.setValue(VALUE, index, value);
| public void | setValue(java.lang.String[] value)
this.setValue(VALUE, value);
| public int | sizeValue()
return this.size(VALUE);
| public void | validate()
boolean restrictionFailure = false;
// Validating property name
if (getName() == null) {
throw new org.netbeans.modules.schema2beans.ValidateException("getName() == null", "name", this); // NOI18N
}
// Validating property value
if (sizeValue() == 0) {
throw new org.netbeans.modules.schema2beans.ValidateException("sizeValue() == 0", "value", this); // NOI18N
}
for (int _index = 0; _index < sizeValue(); ++_index) {
String element = getValue(_index);
if (element != null) {
}
}
|
|