MCPcopy Index your code
hub / github.com/clojure/clojure / getInterfaces

Method getInterfaces

src/jvm/clojure/asm/ClassReader.java:363–376  ·  view source on GitHub ↗

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[])

()

Source from the content-addressed store, hash-verified

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

Callers 3

interfacesMethod · 0.80

Calls 2

readUnsignedShortMethod · 0.95
readClassMethod · 0.95

Tested by

no test coverage detected