Search Java Code Snippets


  Help us in improving the repository. Add new snippets through 'Submit Code Snippet ' link.





Java - Code Samples

 Sample 1. Code Sample / Example / Snippet of java.sql.Statement

  public ForStatement(List<DeclarationStatement> declarations,

Expression condition, Expression post, Statement body) {

super(ExpressionType.For, Void.TYPE);

assert declarations != null;

assert body != null;

this.declarations = declarations; // may be empty, not null

this.condition = condition; // may be null

this.post = post; // may be null

this.body = body; // may be empty block, not null

}



@Override public ForStatement accept(Visitor visitor) {

visitor = visitor.preVisit(this);

List<DeclarationStatement> decls1 =

Expressions.acceptDeclarations(declarations, visitor);

final Expression condition1 =

condition == null ? null : condition.accept(visitor);

final Expression post1 = post == null ? null : post.accept(visitor);

final Statement body1 = body.accept(visitor);

return visitor.visit(this, decls1, condition1, post1, body1);

}


   Like      Feedback      java.sql.Statement



Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner