use of com.datatorrent.stram.webapp.asm.CompactAnnotationNode in project apex-core by apache.
the class OperatorDiscoverer method setFieldAttributes.
private JSONObject setFieldAttributes(String clazz, CompactFieldNode field) throws JSONException {
JSONObject port = new JSONObject();
port.put("name", field.getName());
TypeGraphVertex tgv = typeGraph.getTypeGraphVertex(clazz);
putFieldDescription(field, port, tgv);
List<CompactAnnotationNode> annotations = field.getVisibleAnnotations();
CompactAnnotationNode firstAnnotation;
if (annotations != null && !annotations.isEmpty() && (firstAnnotation = field.getVisibleAnnotations().get(0)) != null) {
for (Map.Entry<String, Object> entry : firstAnnotation.getAnnotations().entrySet()) {
port.put(entry.getKey(), entry.getValue());
}
}
return port;
}
Aggregations