use of io.siddhi.query.api.annotation.Annotation in project siddhi by wso2.
the class AbstractDefinition method toString.
protected String toString(String type) {
StringBuilder definitionBuilder = new StringBuilder();
if (annotations != null && annotations.size() > 0) {
for (Annotation annotation : annotations) {
definitionBuilder.append(annotation.toString());
}
}
definitionBuilder.append("define ").append(type).append(" ").append(id).append(" (");
boolean isFirst = true;
for (Attribute attribute : attributeList) {
if (!isFirst) {
definitionBuilder.append(", ");
} else {
isFirst = false;
}
definitionBuilder.append(attribute.getName()).append(" ").append(attribute.getType().toString().toLowerCase(Locale.getDefault()));
}
definitionBuilder.append(")");
return definitionBuilder.toString();
}
Aggregations