Element parameters = doc.createElement("parameters");
for (Object[] paramAnnotationsInEach : paramAnnotations) {
boolean annotatedParameter = false;
for (Object annot : paramAnnotationsInEach) {
if (annot instanceof Parameter) {
Parameter param = (Parameter) annot;
Element prop = doc.createElementNS(URN_XMLNS_RHQ_CONFIGURATION, "simple-property");
name += "|" + param.name();
prop.setAttribute("name", param.name());
prop.setAttribute("description", param.description());
// default type from RHQ is String but sometimes we need (numbers) integer or long
if (!param.type().equals("")) prop.setAttribute("type", param.type());
parameters.appendChild(prop);
annotatedParameter = true;
}
}
if (!annotatedParameter) {