/// <summary> /// Writes the <see cref="MetadataBody"/> of a <see cref="ClassFile"/> to the <paramref name="writer"/>. /// </summary> /// <param name="classFile">The <see cref="ClassFile"/> to write the header of.</param> /// <param name="writer">The <see cref="IBigEndianWriter"/> to write the <see cref="ConstantPool"/> to.</param> public static void IntoWriter(ClassFile classFile, IBigEndianWriter writer) => new MetadataBody(classFile).Write(writer, new JvmAttributeDirector(classFile.Constants));
/// <summary> /// Creates a new <see cref="ClassFileBody"/> from the specified <paramref name="classFile"/>. /// </summary> /// <param name="classFile">The <see cref="ClassFile"/> to construct the body of.</param> public ClassFileBody(ClassFile classFile) : this(classFile.AccessFlags, classFile.ThisClassIndex, classFile.SuperClassIndex) { }
/// <summary> /// Creates a new <see cref="MetadataBody"/> from the specified <paramref name="classFile"/>. /// </summary> /// <param name="classFile">The <see cref="ClassFile"/> to construct the metadata body of.</param> public MetadataBody(ClassFile classFile) : this(classFile.Interfaces, classFile.Fields, classFile.Methods, classFile.Attributes) { }