@java.lang.Override public void visitCtTryWithResource(final spoon.reflect.code.CtTryWithResource tryWithResource) { spoon.reflect.code.CtTryWithResource other = ((spoon.reflect.code.CtTryWithResource) (this.stack.peek())); enter(tryWithResource); biScan(spoon.reflect.path.CtRole.ANNOTATION, tryWithResource.getAnnotations(), other.getAnnotations()); biScan(spoon.reflect.path.CtRole.TRY_RESOURCE, tryWithResource.getResources(), other.getResources()); biScan(spoon.reflect.path.CtRole.BODY, tryWithResource.getBody(), other.getBody()); biScan(spoon.reflect.path.CtRole.CATCH, tryWithResource.getCatchers(), other.getCatchers()); biScan(spoon.reflect.path.CtRole.FINALIZER, tryWithResource.getFinalizer(), other.getFinalizer()); biScan(spoon.reflect.path.CtRole.COMMENT, tryWithResource.getComments(), other.getComments()); exit(tryWithResource); }
@Override public void visitCtTryWithResource(final CtTryWithResource tryWithResource) { enter(tryWithResource); scan(CtRole.ANNOTATION, tryWithResource.getAnnotations()); scan(CtRole.TRY_RESOURCE, tryWithResource.getResources()); scan(CtRole.BODY, tryWithResource.getBody()); scan(CtRole.CATCH, tryWithResource.getCatchers()); scan(CtRole.FINALIZER, tryWithResource.getFinalizer()); scan(CtRole.COMMENT, tryWithResource.getComments()); exit(tryWithResource); }
@java.lang.Override public void visitCtTryWithResource(final spoon.reflect.code.CtTryWithResource tryWithResource) { replaceInListIfExist(tryWithResource.getAnnotations(), new spoon.support.visitor.replace.ReplacementVisitor.CtElementAnnotationsReplaceListener(tryWithResource)); replaceInListIfExist(tryWithResource.getResources(), new spoon.support.visitor.replace.ReplacementVisitor.CtTryWithResourceResourcesReplaceListener(tryWithResource)); replaceElementIfExist(tryWithResource.getBody(), new spoon.support.visitor.replace.ReplacementVisitor.CtTryBodyReplaceListener(tryWithResource)); replaceInListIfExist(tryWithResource.getCatchers(), new spoon.support.visitor.replace.ReplacementVisitor.CtTryCatchersReplaceListener(tryWithResource)); replaceElementIfExist(tryWithResource.getFinalizer(), new spoon.support.visitor.replace.ReplacementVisitor.CtTryFinalizerReplaceListener(tryWithResource)); replaceInListIfExist(tryWithResource.getComments(), new spoon.support.visitor.replace.ReplacementVisitor.CtElementCommentsReplaceListener(tryWithResource)); }
@java.lang.Override public void visitCtTryWithResource(final spoon.reflect.code.CtTryWithResource tryWithResource) { spoon.reflect.code.CtTryWithResource aCtTryWithResource = tryWithResource.getFactory().Core().createTryWithResource(); this.builder.copy(tryWithResource, aCtTryWithResource); aCtTryWithResource.setAnnotations(this.cloneHelper.clone(tryWithResource.getAnnotations())); aCtTryWithResource.setResources(this.cloneHelper.clone(tryWithResource.getResources())); aCtTryWithResource.setBody(this.cloneHelper.clone(tryWithResource.getBody())); aCtTryWithResource.setCatchers(this.cloneHelper.clone(tryWithResource.getCatchers())); aCtTryWithResource.setFinalizer(this.cloneHelper.clone(tryWithResource.getFinalizer())); aCtTryWithResource.setComments(this.cloneHelper.clone(tryWithResource.getComments())); this.cloneHelper.tailor(tryWithResource, aCtTryWithResource); this.other = aCtTryWithResource; }