/// <summary> /// Constructor for the <c>ClassCreator</c> object. This is /// used to create an object that contains all information that /// relates to the construction of an instance. /// </summary> /// <param name="list"> /// this contains the list of all constructors /// </param> /// <param name="index"> /// this contains all parameters for each constructor /// </param> /// <param name="primary"> /// this is the default no argument constructor /// </param> public ClassCreator(List<Builder> list, Index index, Builder primary) { this.type = index.Type; this.primary = primary; this.index = index; this.list = list; }
/// <summary> /// This is used to build the <c>Builder</c> object that is /// to be used to instantiate the object. The builder contains /// the constructor at the parameters in the declaration order. /// </summary> /// <param name="factory"> /// this is the constructor that is to be scanned /// </param> /// <param name="map"> /// this is the parameter map that contains parameters /// </param> public void Build(Constructor factory, Index map) { Builder builder = new Builder(factory, map); if(builder.isDefault()) { primary = builder; } list.add(builder); }