public abstract class PointerType extends Object implements NativeMapped
NativeMapped.fromNative(java.lang.Object, com.sun.jna.FromNativeContext) method,
which should instantiate a new object (or look up an existing one)
of the appropriate type.| Modifier | Constructor and Description |
|---|---|
protected |
PointerType()
The default constructor wraps a NULL pointer.
|
protected |
PointerType(Pointer p)
This constructor is typically used by
fromNative(java.lang.Object, com.sun.jna.FromNativeContext) if generating
a new object instance. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o)
Instances of
PointerType with identical pointers compare
equal by default. |
Object |
fromNative(Object nativeValue,
FromNativeContext context)
The default implementation simply creates a new instance of the class
and assigns its pointer field.
|
Pointer |
getPointer()
Returns the associated native
Pointer. |
int |
hashCode()
The hash code for a
PointerType is the same as that for
its pointer. |
Class |
nativeType()
All
PointerType classes represent a native Pointer. |
void |
setPointer(Pointer p) |
Object |
toNative()
Convert this object to its native type (a
Pointer). |
String |
toString() |
protected PointerType()
protected PointerType(Pointer p)
fromNative(java.lang.Object, com.sun.jna.FromNativeContext) if generating
a new object instance.public Class nativeType()
PointerType classes represent a native Pointer.nativeType in interface NativeMappedpublic Object toNative()
Pointer).toNative in interface NativeMappedpublic void setPointer(Pointer p)
public Object fromNative(Object nativeValue, FromNativeContext context)
PointerType instance for each unique
Pointer value, or instantiating a different PointerType
subclass.fromNative in interface NativeMappedpublic int hashCode()
PointerType is the same as that for
its pointer.public boolean equals(Object o)
PointerType with identical pointers compare
equal by default.