#include "ConstantPoolTags/Tags.h" #include #include #include #include #include #include #include #include #include void Methods::MethodParser(method_info &p, JavaClassFormat &jc) { p.access_flags = Utils::ReadFromStartIntoVal(Globals::buffer()); p.name_index = Utils::ReadFromStartIntoVal(Globals::buffer()); p.descriptor_index = Utils::ReadFromStartIntoVal(Globals::buffer()); p.attributes_count = Utils::ReadFromStartIntoVal(Globals::buffer()); // std::cout << p.attributes_count.ToHostFormat() << std::endl; // FIXME: Implement attributes[] for (int i = 0; i < p.attributes_count.ToHostFormat(); i++) { attribute_info a; a.attribute_name_index = Utils::ReadFromStartIntoVal(Globals::buffer()); a.attribute_length = Utils::ReadFromStartIntoVal(Globals::buffer()); for (int j = 0; j < a.attribute_length.ToHostFormat(); j++) { a.info.push_back(Utils::ReadFromStartIntoVal(Globals::buffer())); } std::cout << a.attribute_name_index.ToHostFormat() << std::endl; // std::cout << a.info.size() << std::endl; } // if ((p.access_flags.ToHostFormat() & (int)Method::ACCESS_FLAGS::ACC_NATIVE) == 0 && // (p.access_flags.ToHostFormat() & (int)Method::ACCESS_FLAGS::ACC_ABSTRACT) == 0) // { // std::cout << "Not Set" << std::endl; // } jc.methods.push_back(p); }