IntConstantExpr extends ConstantExpr { @Override public void accept(IAstVisitor visitor) { visitor.visitIntConstantExpr(this); } IntConstantExpr(String text); @Override boolean hasChild(IAstNode child); String getValue(); int getNumericValue(); @Override void accept(IAstVisitor visitor); @Override IntConstantExpr clone();  }
@Test public void accept() throws Exception { new StandardVisitor() { @Override public void visitIntConstantExpr(IntConstantExpr intConstantExpr) { super.visitIntConstantExpr(intConstantExpr); assertEquals("42", intConstantExpr.getValue()); } }.visit(new IntConstantExpr("42")); }