/** Initialize the type mapper for this structure. * If <code>null</code>, the default mapper for the * defining class will be used. * @param mapper Find the type mapper appropriate for this structure's * context if none was explicitly set. */ private void initializeTypeMapper(TypeMapper mapper) { if (mapper == null) { mapper = Native.getTypeMapper(getClass()); } this.typeMapper = mapper; layoutChanged(); }
private static Pointer get(Object obj, Class<?> cls) { TypeMapper mapper = Native.getTypeMapper(cls); if (mapper != null) { ToNativeConverter nc = mapper.getToNativeConverter(cls);
private CallbackReference(Callback callback, int callingConvention, boolean direct) { super(callback); TypeMapper mapper = Native.getTypeMapper(callback.getClass()); this.callingConvention = callingConvention; Class<?>[] nativeParamTypes;
/** Change the type mapping for this structure. May cause the structure * to be resized and any existing memory to be reallocated. * If <code>null</code>, the default mapper for the * defining class will be used. */ protected void setTypeMapper(TypeMapper mapper) { if (mapper == null) { Class declaring = getClass().getDeclaringClass(); if (declaring != null) { mapper = Native.getTypeMapper(declaring); } } this.typeMapper = mapper; this.size = CALCULATE_SIZE; this.memory = null; }
/** Initialize the type mapper for this structure. * If <code>null</code>, the default mapper for the * defining class will be used. * @param mapper Find the type mapper appropriate for this structure's * context if none was explicitly set. */ private void initializeTypeMapper(TypeMapper mapper) { if (mapper == null) { mapper = Native.getTypeMapper(getClass()); } this.typeMapper = mapper; layoutChanged(); }
private static Pointer get(Object obj, Class<?> cls) { TypeMapper mapper = Native.getTypeMapper(cls); if (mapper != null) { ToNativeConverter nc = mapper.getToNativeConverter(cls);
private CallbackReference(Callback callback, int callingConvention, boolean direct) { super(callback); TypeMapper mapper = Native.getTypeMapper(callback.getClass()); this.callingConvention = callingConvention; Class<?>[] nativeParamTypes;
private CallbackReference(Callback callback, int callingConvention) { super(callback); Class type = getCallbackClass(callback.getClass()); TypeMapper mapper = Native.getTypeMapper(type); Method m = getCallbackMethod(callback); if (callback instanceof CallbackProxy) {