| 2334 | } |
| 2335 | |
| 2336 | unsigned countMethods(Thread* t, GcClass* c, bool publicOnly) |
| 2337 | { |
| 2338 | GcArray* table = cast<GcArray>(t, c->methodTable()); |
| 2339 | unsigned count = 0; |
| 2340 | for (unsigned i = 0, j = classDeclaredMethodCount(t, c); i < j; ++i) { |
| 2341 | GcMethod* vmMethod = cast<GcMethod>(t, table->body()[i]); |
| 2342 | if (((not publicOnly) or (vmMethod->flags() & ACC_PUBLIC)) |
| 2343 | and vmMethod->name()->body()[0] != '<') { |
| 2344 | ++count; |
| 2345 | } |
| 2346 | } |
| 2347 | return count; |
| 2348 | } |
| 2349 | |
| 2350 | unsigned countFields(Thread* t, GcClass* c, bool publicOnly) |
| 2351 | { |