public static String translateFieldValue(List<VariableDeclarator> variables) { for (VariableDeclarator var : variables) { if (var.getInit() != null) return var.getInit().toString(); } return ""; }
public void visit(VariableDeclarator n, Object arg) { n.getId().accept(this, arg); if (n.getInit() != null) { n.getInit().accept(this, arg); } }