|
JNA API> 3.2.7 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jna.PointerType
public abstract class PointerType
Type representing a type-safe native pointer.
Derived classes may override the 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.
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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()
All PointerType classes represent a native Pointer . |
void |
setPointer(Pointer p)
|
java.lang.Object |
toNative()
Convert this object to its native type (a Pointer ). |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected PointerType()
protected PointerType(Pointer p)
fromNative(java.lang.Object, com.sun.jna.FromNativeContext)
if generating
a new object instance.
Method Detail |
---|
public java.lang.Class nativeType()
PointerType
classes represent a native Pointer
.
nativeType
in interface NativeMapped
public java.lang.Object toNative()
Pointer
).
toNative
in interface NativeMapped
public 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 NativeMapped
public int hashCode()
PointerType
is the same as that for
its pointer.
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
PointerType
with identical pointers compare
equal by default.
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
JNA API> 3.2.7 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |