Exemple #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);
 }
 @Override
 public CPPASTIfStatement copy(CopyStyle style) {
   CPPASTIfStatement copy = new CPPASTIfStatement();
   copy.setConditionDeclaration(condDecl == null ? null : condDecl.copy(style));
   copy.setConditionExpression(condition == null ? null : condition.copy(style));
   copy.setThenClause(thenClause == null ? null : thenClause.copy(style));
   copy.setElseClause(elseClause == null ? null : elseClause.copy(style));
   return copy(copy, style);
 }
 @Override
 public CPPASTIfStatement copy(CopyStyle style) {
   CPPASTIfStatement copy = new CPPASTIfStatement();
   copy.setConditionDeclaration(condDecl == null ? null : condDecl.copy(style));
   copy.setConditionExpression(condition == null ? null : condition.copy(style));
   copy.setThenClause(thenClause == null ? null : thenClause.copy(style));
   copy.setElseClause(elseClause == null ? null : elseClause.copy(style));
   copy.setOffsetAndLength(this);
   if (style == CopyStyle.withLocations) {
     copy.setCopyLocation(this);
   }
   return copy;
 }