/// <summary>Construct a ClassFileWriter for a class.</summary> /// <remarks>Construct a ClassFileWriter for a class.</remarks> /// <param name="className"> /// the name of the class to write, including /// full package qualification. /// </param> /// <param name="superClassName"> /// the name of the superclass of the class /// to write, including full package qualification. /// </param> /// <param name="sourceFileName"> /// the name of the source file to use for /// producing debug information, or null if debug information /// is not desired /// </param> public ClassFileWriter(string className, string superClassName, string sourceFileName) { generatedClassName = className; itsConstantPool = new ConstantPool(this); itsThisClassIndex = itsConstantPool.AddClass(className); itsSuperClassIndex = itsConstantPool.AddClass(superClassName); if (sourceFileName != null) { itsSourceFileNameIndex = itsConstantPool.AddUtf8(sourceFileName); } // All "new" implementations are supposed to output ACC_SUPER as a // class flag. This is specified in the first JVM spec, so it should // be old enough that it's okay to always set it. itsFlags = ACC_PUBLIC | ACC_SUPER; }