@SuppressWarnings("unchecked") @Override public <T, U> U getValue(T element) { return ((U) ((Object) (castTarget(element).getAssertExpression()))); }
@Override public <T> void visitCtAssert(CtAssert<T> asserted) { if (child instanceof CtExpression) { if (asserted.getAssertExpression() == null) { asserted.setAssertExpression((CtExpression<Boolean>) child); return; } else { asserted.setExpression((CtExpression<T>) child); return; } } super.visitCtAssert(asserted); }
public <T> void visitCtAssert(final spoon.reflect.code.CtAssert<T> asserted) { spoon.reflect.code.CtAssert other = ((spoon.reflect.code.CtAssert) (this.stack.peek())); enter(asserted); biScan(spoon.reflect.path.CtRole.ANNOTATION, asserted.getAnnotations(), other.getAnnotations()); biScan(spoon.reflect.path.CtRole.CONDITION, asserted.getAssertExpression(), other.getAssertExpression()); biScan(spoon.reflect.path.CtRole.EXPRESSION, asserted.getExpression(), other.getExpression()); biScan(spoon.reflect.path.CtRole.COMMENT, asserted.getComments(), other.getComments()); exit(asserted); }
public <T> void visitCtAssert(final CtAssert<T> asserted) { enter(asserted); scan(CtRole.ANNOTATION, asserted.getAnnotations()); scan(CtRole.CONDITION, asserted.getAssertExpression()); scan(CtRole.EXPRESSION, asserted.getExpression()); scan(CtRole.COMMENT, asserted.getComments()); exit(asserted); }
@java.lang.Override public <T> void visitCtAssert(final spoon.reflect.code.CtAssert<T> asserted) { replaceInListIfExist(asserted.getAnnotations(), new spoon.support.visitor.replace.ReplacementVisitor.CtElementAnnotationsReplaceListener(asserted)); replaceElementIfExist(asserted.getAssertExpression(), new spoon.support.visitor.replace.ReplacementVisitor.CtAssertAssertExpressionReplaceListener(asserted)); replaceElementIfExist(asserted.getExpression(), new spoon.support.visitor.replace.ReplacementVisitor.CtAssertExpressionReplaceListener(asserted)); replaceInListIfExist(asserted.getComments(), new spoon.support.visitor.replace.ReplacementVisitor.CtElementCommentsReplaceListener(asserted)); }
@Override public <T> void visitCtAssert(CtAssert<T> asserted) { enterCtStatement(asserted); printer.writeKeyword("assert").writeSpace(); scan(asserted.getAssertExpression()); if (asserted.getExpression() != null) { printer.writeSpace().writeSeparator(":").writeSpace(); scan(asserted.getExpression()); } exitCtStatement(asserted); }
public <T> void visitCtAssert(final spoon.reflect.code.CtAssert<T> asserted) { spoon.reflect.code.CtAssert<T> aCtAssert = asserted.getFactory().Core().createAssert(); this.builder.copy(asserted, aCtAssert); aCtAssert.setAnnotations(this.cloneHelper.clone(asserted.getAnnotations())); aCtAssert.setAssertExpression(this.cloneHelper.clone(asserted.getAssertExpression())); aCtAssert.setExpression(this.cloneHelper.clone(asserted.getExpression())); aCtAssert.setComments(this.cloneHelper.clone(asserted.getComments())); this.cloneHelper.tailor(asserted, aCtAssert); this.other = aCtAssert; }
public <T> void visitCtAssert(CtAssert<T> asserted) { signature.append("assert "); scan(asserted.getAssertExpression()); signature.append(":"); scan(asserted.getExpression()); }
@SuppressWarnings({ "unchecked", "rawtypes" }) @Override public <T> void visitCtAssert(CtAssert<T> asserted) { super.visitCtAssert(asserted); CtExpression exper=asserted.getExpression(); if (candidates.containsKey(exper)) { asserted.setExpression(candidates.get(exper)); saveSketchAndSynthesize(); asserted.setExpression(exper); resoreDiskFile(); } CtExpression assertexper=asserted.getAssertExpression(); if (candidates.containsKey(assertexper)) { asserted.setAssertExpression(candidates.get(assertexper)); saveSketchAndSynthesize(); asserted.setAssertExpression(assertexper); resoreDiskFile(); } }
public <T> void visitCtAssert(CtAssert<T> asserted) { enterCtStatement(asserted); write("assert "); scan(asserted.getAssertExpression()); if (asserted.getExpression() != null) { write(" : "); scan(asserted.getExpression()); } }
public <T> void visitCtAssert(CtAssert<T> asserted) { enter(asserted); scan(asserted.getAnnotations()); scan(asserted.getAssertExpression()); scan(asserted.getExpression()); exit(asserted); }