Returns the internal names of the implemented interfaces (see Type#getInternalName()). @return the internal names of the directly implemented interfaces. Inherited implemented interfaces are not returned. @see ClassVisitor#visit(int, int, String, String, String, String[])
()
| 361 | * @see ClassVisitor#visit(int, int, String, String, String, String[]) |
| 362 | */ |
| 363 | public String[] getInterfaces() { |
| 364 | // interfaces_count is after the access_flags, this_class and super_class fields (2 bytes each). |
| 365 | int currentOffset = header + 6; |
| 366 | int interfacesCount = readUnsignedShort(currentOffset); |
| 367 | String[] interfaces = new String[interfacesCount]; |
| 368 | if (interfacesCount > 0) { |
| 369 | char[] charBuffer = new char[maxStringLength]; |
| 370 | for (int i = 0; i < interfacesCount; ++i) { |
| 371 | currentOffset += 2; |
| 372 | interfaces[i] = readClass(currentOffset, charBuffer); |
| 373 | } |
| 374 | } |
| 375 | return interfaces; |
| 376 | } |
| 377 | |
| 378 | // ----------------------------------------------------------------------------------------------- |
| 379 | // Public methods |
no test coverage detected