classfile.cxx (ff7655f0) classfile.cxx (748f0f6d)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 678 unchanged lines hidden (view full) ---

687 i != exceptions.end(); ++i)
688 {
689 appendU2(m_methods, addClassInfo(*i));
690 }
691 }
692 appendSignatureAttribute(m_methods, signature);
693}
694
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 678 unchanged lines hidden (view full) ---

687 i != exceptions.end(); ++i)
688 {
689 appendU2(m_methods, addClassInfo(*i));
690 }
691 }
692 appendSignatureAttribute(m_methods, signature);
693}
694
695#define CLASSFILE_FMT 49.0 // a classfile format understood by JDK 5/6/7
696
695void ClassFile::write(FileStream & file) const {
696 writeU4(file, 0xCAFEBABE);
697void ClassFile::write(FileStream & file) const {
698 writeU4(file, 0xCAFEBABE);
697 writeU2(file, 0);
698 writeU2(file, 46);
699 writeU2(file, static_cast<sal_uInt16>((CLASSFILE_FMT-(int)CLASSFILE_FMT)*100000));
700 writeU2(file, static_cast<sal_uInt16>((int)CLASSFILE_FMT));
699 writeU2(file, m_constantPoolCount);
700 writeStream(file, m_constantPool);
701 writeU2(file, static_cast< sal_uInt16 >(m_accessFlags));
702 writeU2(file, m_thisClass);
703 writeU2(file, m_superClass);
704 writeU2(file, m_interfacesCount);
705 writeStream(file, m_interfaces);
706 writeU2(file, m_fieldsCount);

--- 193 unchanged lines hidden ---
701 writeU2(file, m_constantPoolCount);
702 writeStream(file, m_constantPool);
703 writeU2(file, static_cast< sal_uInt16 >(m_accessFlags));
704 writeU2(file, m_thisClass);
705 writeU2(file, m_superClass);
706 writeU2(file, m_interfacesCount);
707 writeStream(file, m_interfaces);
708 writeU2(file, m_fieldsCount);

--- 193 unchanged lines hidden ---