@java.lang.Override public void set(spoon.reflect.code.CtExpression replace) { this.element.setThrownExpression(replace); } }
@Override public void visitCtThrow(CtThrow throwStatement) { if (throwStatement.getThrownExpression() == null && child instanceof CtExpression) { throwStatement.setThrownExpression((CtExpression<? extends Throwable>) child); return; } super.visitCtThrow(throwStatement); }
@Override public <T, U> void setValue(T element, U value) { castTarget(element).setThrownExpression(castValue(value)); } }
/** * Creates a throw. * * @param thrownExp * Expression of the throw. * @return a throw. */ public CtThrow createCtThrow(String thrownExp) { return factory.Core().createThrow().setThrownExpression(this.<Throwable>createCodeSnippetExpression(thrownExp)); }
@Override public void visitCtThrow(CtThrow throwStatement) { CtThrow r = throwStatement.getFactory().Core().createThrow(); r.setThrownExpression(evaluate(throwStatement.getThrownExpression())); setResult(r); flowEnded = true; }
public void visitCtThrow(final spoon.reflect.code.CtThrow throwStatement) { spoon.reflect.code.CtThrow aCtThrow = throwStatement.getFactory().Core().createThrow(); this.builder.copy(throwStatement, aCtThrow); aCtThrow.setAnnotations(this.cloneHelper.clone(throwStatement.getAnnotations())); aCtThrow.setThrownExpression(this.cloneHelper.clone(throwStatement.getThrownExpression())); aCtThrow.setComments(this.cloneHelper.clone(throwStatement.getComments())); this.cloneHelper.tailor(throwStatement, aCtThrow); this.other = aCtThrow; }
public static <E extends Throwable> CtThrow newThrow(Factory factory, CtExpression<E> thrownExpression) { CtThrow aThrow = factory.Core().createThrow(); aThrow.setThrownExpression(thrownExpression); return aThrow; }
@Override public void visitCtThrow(CtThrow throwStatement) { if (throwStatement.getThrownExpression() == null) { throwStatement.setThrownExpression((CtExpression<? extends Throwable>) child); return; } super.visitCtThrow(throwStatement); }
/** * Creates a throw. * * @param thrownExp * Expression of the throw. * @return a throw. */ public CtThrow createCtThrow(String thrownExp) { return factory.Core().createThrow().setThrownExpression(this.<Throwable>createCodeSnippetExpression(thrownExp)); }
public void visitCtThrow(CtThrow throwStatement) { CtThrow r = throwStatement.getFactory().Core().createThrow(); r.setThrownExpression(evaluate(r, throwStatement.getThrownExpression())); setResult(r); flowEnded = true; }