@Override public R visit(final MemberValuePair n, final A arg) { { R result = n.getValue().accept(this, arg); if (result != null) { return result; } } return null; }
@Override public Node visit(final MemberValuePair n, final A arg) { n.setValue((Expression) n.getValue().accept(this, arg)); return n; }
final Expression value = memberValuePair.getValue(); final Class<?> type = fieldsMap.get(name); if (type != null) {
@Override public void visit(final MemberValuePair n, final A arg) { visitComment(n.getComment(), arg); n.getValue().accept(this, arg); }
@Override public void visit(MethodDeclaration method, A result) { if (CollectionUtils.isEmpty(method.getAnnotations())) { return; } for (AnnotationExpr annotation : method.getAnnotations()) { if (!annotation.getClass().equals(NormalAnnotationExpr.class)) { continue; } NormalAnnotationExpr annot = (NormalAnnotationExpr) annotation; if (annot.getName().toString().equals(SampleCode.class.getSimpleName()) && !CollectionUtils.isEmpty(annot.getPairs())) { for (MemberValuePair pair : annot.getPairs()) { // get the 'api' parameter from the annotation to let us know which api this function belongs to if (StringUtils.equals(pair.getName(), "api") && !StringUtils.isBlank(pair.getValue().toString())) { result.put(getCacheRowKey(type, pair.getValue().toString().replace("\"", "")), stripTestPrefix(method.getName()), stripCurlyBrackets(method.getBody().toString())); return; } } } } } }
public void visit(MemberValuePair n, Object arg) { printer.print(n.getName()); printer.print(" = "); n.getValue().accept(this, arg); }
@Override public void visit(final MemberValuePair n, final Object arg) { printJavaComment(n.getComment(), arg); printer.print(n.getName()); printer.print(" = "); n.getValue().accept(this, arg); }
@Override public Node visit(MemberValuePair _n, Object _arg) { Expression value = cloneNodes(_n.getValue(), _arg); Comment comment = cloneNodes(_n.getComment(), _arg); MemberValuePair r = new MemberValuePair( _n.getBeginLine(), _n.getBeginColumn(), _n.getEndLine(), _n.getEndColumn(), _n.getName(), value ); r.setComment(comment); return r; }