MCPcopy Index your code
hub / github.com/java-native-access/jna / getPointerConstructor

Method getPointerConstructor

src/com/sun/jna/Structure.java:1989–1998  ·  view source on GitHub ↗

Returns a constructor for the given type with a single Pointer argument, null if no such constructor is found. @param type the class @param the type @return a constructor with a single Pointer argument, null if none is found

(Class<T> type)

Source from the content-addressed store, hash-verified

1987 * @return a constructor with a single Pointer argument, null if none is found
1988 */
1989 private static <T> Constructor<T> getPointerConstructor(Class<T> type) {
1990 for (Constructor constructor : type.getConstructors()) {
1991 Class[] parameterTypes = constructor.getParameterTypes();
1992 if (parameterTypes.length == 1 && parameterTypes[0].equals(Pointer.class)) {
1993 return constructor;
1994 }
1995 }
1996
1997 return null;
1998 }
1999
2000 protected static class StructField extends Object {
2001 public String name;

Callers 1

newInstanceMethod · 0.95

Calls 2

getParameterTypesMethod · 0.65
equalsMethod · 0.45

Tested by

no test coverage detected