public abstract class PointerType extends java.lang.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(java.lang.Object o)
Instances of
PointerType with identical pointers compare
equal by default. |
java.lang.Object |
fromNative(java.lang.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. |
java.lang.Class<?> |
nativeType()
Indicate the native type used by this converter.
|
void |
setPointer(Pointer p) |
java.lang.Object |
toNative()
Convert this object to its native type (a
Pointer). |
java.lang.String |
toString() |
protected PointerType()
protected PointerType(Pointer p)
fromNative(java.lang.Object, com.sun.jna.FromNativeContext) if generating
a new object instance.public java.lang.Class<?> nativeType()
NativeMappednativeType in interface NativeMappedpublic java.lang.Object toNative()
Pointer).toNative in interface NativeMappedpublic Pointer getPointer()
Pointer.public void setPointer(Pointer p)
public java.lang.Object fromNative(java.lang.Object nativeValue,
FromNativeContext context)
PointerType instance for each unique
Pointer value, or instantiating a different PointerType
subclass.fromNative in interface NativeMappednativeValue - Java representation of the native type to be converted.context - Context in which the conversion is taking place.public int hashCode()
PointerType is the same as that for
its pointer.hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
PointerType with identical pointers compare
equal by default.equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object