1 package polyglot.ast; 2 3 /** 4 * A <code>Cast</code> is an immutable representation of a casting 5 * operation. It consists of an <code>Expr</code> being cast and a 6 * <code>TypeNode</code> being cast to. 7 */ 8 public interface Cast extends Expr 9 { 10 /** 11 * The type to cast to. 12 */ 13 TypeNode castType(); 14 15 /** 16 * Set the type to cast to. 17 */ 18 Cast castType(TypeNode castType); 19 20 /** 21 * The expression to cast. 22 */ 23 Expr expr(); 24 25 /** 26 * Set the expression to cast. 27 */ 28 Cast expr(Expr expr); 29 } 30