/** Convert this object to its native type (a {@link Pointer}). */ @Override public Object toNative() { return getPointer(); }
@Override public Object fromNative(Object arg0, FromNativeContext arg1) { return super.fromNative(arg0, arg1); }
public void setPointer(Pointer p) { if (immutable) { throw new UnsupportedOperationException("immutable"); } super.setPointer(p); } }
@Override public Object fromNative(Object nativeValue, FromNativeContext context) { Object o = super.fromNative(nativeValue, context); if (INVALID_HANDLE_VALUE.equals(o)) return INVALID_HANDLE_VALUE; return o; } }
@Override public void setPointer(Pointer p) { if (immutable) { throw new UnsupportedOperationException("immutable reference"); } super.setPointer(p); }
@Override public Object fromNative(Object nativeValue, FromNativeContext context) { Object o = super.fromNative(nativeValue, context); if (INVALID_HANDLE_VALUE.equals(o)) { return INVALID_HANDLE_VALUE; } return o; }
public void setPointer(Pointer p) { if (immutable) { throw new UnsupportedOperationException("immutable reference"); } super.setPointer(p); } }
/** Instances of <code>PointerType</code> with identical pointers compare * equal by default. */ @Override public boolean equals(Object o) { if (o == this) { return true; } if (o instanceof PointerType) { Pointer p = ((PointerType)o).getPointer(); if (pointer == null) { return p == null; } return pointer.equals(p); } return false; }
@Override public Object fromNative(Object nativeValue, FromNativeContext context) { Object o = super.fromNative(nativeValue, context); if (INVALID_HANDLE_VALUE.equals(o)) { return INVALID_HANDLE_VALUE; } return o; } }
public void setPointer(Pointer p) { if (immutable) { throw new UnsupportedOperationException("immutable"); } super.setPointer(p); } }
/** Convert this object to its native type (a {@link Pointer}). */ public Object toNative() { return getPointer(); }
/** Override to the appropriate object for INVALID_HANDLE_VALUE. */ @Override public Object fromNative(Object nativeValue, FromNativeContext context) { Object o = super.fromNative(nativeValue, context); if (WinBase.INVALID_HANDLE_VALUE.equals(o)) { return WinBase.INVALID_HANDLE_VALUE; } return o; }
public void setPointer(Pointer p) { if (immutable) { throw new UnsupportedOperationException("immutable"); } super.setPointer(p); } }
public static long getAddress(PointerType p) { return p.getPointer().peer; } public static Pointer fromAddress(long peer) {
public Object fromNative(Object nativeValue, FromNativeContext context) { Object o = super.fromNative(nativeValue, context); if (INVALID_HANDLE_VALUE.equals(o)) return INVALID_HANDLE_VALUE; return o; } }
@Override public void setPointer(Pointer p) { if (immutable) { throw new UnsupportedOperationException("immutable reference"); } super.setPointer(p); }
/** Convert this object to its native type (a {@link Pointer}). */ @Override public Object toNative() { return getPointer(); }
/** Override to the appropriate object for INVALID_HANDLE_VALUE. */ public Object fromNative(Object nativeValue, FromNativeContext context) { Object o = super.fromNative(nativeValue, context); if (WinBase.INVALID_HANDLE_VALUE.equals(o)) { return WinBase.INVALID_HANDLE_VALUE; } return o; }
public T getValue(Class<T> type) { Pointer value = getPointer().getPointer(0); if(value==null) return null; try { T v = type.newInstance(); v.setPointer(value); return v; } catch (InstantiationException e) { throw new InstantiationError(e.getMessage()); } catch (IllegalAccessException e) { throw new IllegalAccessError(e.getMessage()); } } }
public WStringPointer(PointerType p) { this(p.getPointer(), 0); } public WStringPointer(Pointer p) {