Example #1
0
 protected void copyForStatement(CASTForStatement copy, CopyStyle style) {
   copy.setInitializerStatement(init == null ? null : init.copy(style));
   copy.setConditionExpression(condition == null ? null : condition.copy(style));
   copy.setIterationExpression(
       iterationExpression == null ? null : iterationExpression.copy(style));
   copy.setBody(body == null ? null : body.copy(style));
   copy.setOffsetAndLength(this);
 }
Example #2
0
 @Override
 public CASTForStatement copy(CopyStyle style) {
   CASTForStatement copy = new CASTForStatement();
   copyForStatement(copy, style);
   if (style == CopyStyle.withLocations) {
     copy.setCopyLocation(this);
   }
   return copy;
 }