public void visitCtIf(final spoon.reflect.code.CtIf ifElement) { spoon.reflect.code.CtIf other = ((spoon.reflect.code.CtIf) (this.stack.peek())); enter(ifElement); biScan(spoon.reflect.path.CtRole.ANNOTATION, ifElement.getAnnotations(), other.getAnnotations()); biScan(spoon.reflect.path.CtRole.CONDITION, ifElement.getCondition(), other.getCondition()); biScan(spoon.reflect.path.CtRole.THEN, ((spoon.reflect.code.CtStatement) (ifElement.getThenStatement())), other.getThenStatement()); biScan(spoon.reflect.path.CtRole.ELSE, ((spoon.reflect.code.CtStatement) (ifElement.getElseStatement())), other.getElseStatement()); biScan(spoon.reflect.path.CtRole.COMMENT, ifElement.getComments(), other.getComments()); exit(ifElement); }
public void visitCtIf(final CtIf ifElement) { enter(ifElement); scan(CtRole.ANNOTATION, ifElement.getAnnotations()); scan(CtRole.CONDITION, ifElement.getCondition()); scan(CtRole.THEN, ((CtStatement) (ifElement.getThenStatement()))); scan(CtRole.ELSE, ((CtStatement) (ifElement.getElseStatement()))); scan(CtRole.COMMENT, ifElement.getComments()); exit(ifElement); }
@java.lang.Override public void visitCtIf(final spoon.reflect.code.CtIf ifElement) { replaceInListIfExist(ifElement.getAnnotations(), new spoon.support.visitor.replace.ReplacementVisitor.CtElementAnnotationsReplaceListener(ifElement)); replaceElementIfExist(ifElement.getCondition(), new spoon.support.visitor.replace.ReplacementVisitor.CtIfConditionReplaceListener(ifElement)); replaceElementIfExist(((spoon.reflect.code.CtStatement) (ifElement.getThenStatement())), new spoon.support.visitor.replace.ReplacementVisitor.CtIfThenStatementReplaceListener(ifElement)); replaceElementIfExist(((spoon.reflect.code.CtStatement) (ifElement.getElseStatement())), new spoon.support.visitor.replace.ReplacementVisitor.CtIfElseStatementReplaceListener(ifElement)); replaceInListIfExist(ifElement.getComments(), new spoon.support.visitor.replace.ReplacementVisitor.CtElementCommentsReplaceListener(ifElement)); }
public void visitCtIf(final spoon.reflect.code.CtIf ifElement) { spoon.reflect.code.CtIf aCtIf = ifElement.getFactory().Core().createIf(); this.builder.copy(ifElement, aCtIf); aCtIf.setAnnotations(this.cloneHelper.clone(ifElement.getAnnotations())); aCtIf.setCondition(this.cloneHelper.clone(ifElement.getCondition())); aCtIf.setThenStatement(this.cloneHelper.clone(((spoon.reflect.code.CtStatement) (ifElement.getThenStatement())))); aCtIf.setElseStatement(this.cloneHelper.clone(((spoon.reflect.code.CtStatement) (ifElement.getElseStatement())))); aCtIf.setComments(this.cloneHelper.clone(ifElement.getComments())); this.cloneHelper.tailor(ifElement, aCtIf); this.other = aCtIf; }