MCPcopy Create free account
hub / github.com/java-native-access/jna / getSignature

Method getSignature

src/com/sun/jna/Native.java:1709–1725  ·  view source on GitHub ↗
(Class<?> cls)

Source from the content-addressed store, hash-verified

1707 private static native void unregister(Class<?> cls, long[] handles);
1708
1709 static String getSignature(Class<?> cls) {
1710 if (cls.isArray()) {
1711 return "[" + getSignature(cls.getComponentType());
1712 }
1713 if (cls.isPrimitive()) {
1714 if (cls == void.class) return "V";
1715 if (cls == boolean.class) return "Z";
1716 if (cls == byte.class) return "B";
1717 if (cls == short.class) return "S";
1718 if (cls == char.class) return "C";
1719 if (cls == int.class) return "I";
1720 if (cls == long.class) return "J";
1721 if (cls == float.class) return "F";
1722 if (cls == double.class) return "D";
1723 }
1724 return "L" + replace(".", "/", cls.getName()) + ";";
1725 }
1726
1727 // No String.replace available in 1.4
1728 static String replace(String s1, String s2, String str) {

Callers 2

registerMethod · 0.95

Calls 3

replaceMethod · 0.95
isArrayMethod · 0.80
getNameMethod · 0.65

Tested by 1