1 package polyglot.ast; 2 3 import polyglot.types.ConstructorInstance; 4 import java.util.List; 5 import polyglot.types.Flags; 6 7 /** 8 * A <code>ConstructorDecl</code> is an immutable representation of a 9 * constructor declaration as part of a class body. 10 */ 11 public interface ConstructorDecl extends ProcedureDecl 12 { 13 /** The constructor's flags. */ 14 Flags flags(); 15 16 /** Set the constructor's flags. */ 17 ConstructorDecl flags(Flags flags); 18 19 /** 20 * The constructor's name. This should be the short name of the 21 * containing class. 22 */ 23 String name(); 24 25 /** Set the constructor's name. */ 26 ConstructorDecl name(String name); 27 28 /** The constructor's formal parameters. 29 * @return A list of {@link polyglot.ast.Formal Formal}. 30 */ 31 List formals(); 32 33 /** Set the constructor's formal parameters. 34 * @param formals A list of {@link polyglot.ast.Formal Formal}. 35 */ 36 ConstructorDecl formals(List formals); 37 38 /** The constructor's exception throw types. 39 * @return A list of {@link polyglot.ast.TypeNode TypeNode}. 40 */ 41 List throwTypes(); 42 43 /** Set the constructor's exception throw types. 44 * @param throwTypes A list of {@link polyglot.ast.TypeNode TypeNode}. 45 */ 46 ConstructorDecl throwTypes(List throwTypes); 47 48 /** 49 * The constructor type object. This field may not be valid until 50 * after signature disambiguation. 51 */ 52 ConstructorInstance constructorInstance(); 53 54 /** Set the constructor's type object. */ 55 ConstructorDecl constructorInstance(ConstructorInstance ci); 56 } 57