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)
| 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; |
no test coverage detected