Package com.sun.jna

Klasse PointerType

java.lang.Object
com.sun.jna.PointerType
Alle implementierten Schnittstellen:
NativeMapped
Bekannte direkte Unterklassen:
ByReference, COMInvoker, CoreFoundation.CFTypeRef, Ddeml.HCONV, Ddeml.HCONVLIST, Ddeml.HSZ, Guid.REFIID, IOKit.IOObject, Kstat2.Kstat2Handle, Kstat2.Kstat2Map, Kstat2.Kstat2MatcherList, Udev.UdevContext, Udev.UdevDevice, Udev.UdevEnumerate, Udev.UdevListEntry, WinDef.LPVOID, WinDef.PVOID, WinNT.HANDLE, WTypes.BSTR, WTypes.LPOLESTR, WTypes.LPSTR, WTypes.LPWSTR, X11.Display, X11.GC, X11.Screen, X11.Visual, X11.XImage

public abstract class PointerType extends Object implements NativeMapped
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.
  • Konstruktordetails

  • Methodendetails

    • nativeType

      public Class<?> nativeType()
      Beschreibung aus Schnittstelle kopiert: NativeMapped
      Indicate the native type used by this converter.
      Angegeben von:
      nativeType in Schnittstelle NativeMapped
      Gibt zurück:
      Java class representation of the native type.
    • toNative

      public Object toNative()
      Convert this object to its native type (a Pointer).
      Angegeben von:
      toNative in Schnittstelle NativeMapped
      Gibt zurück:
      Java representation of the original Java object converted to a native type.
    • getPointer

      public Pointer getPointer()
      Returns the associated native Pointer.
      Gibt zurück:
      Native pointer representation for this object.
    • setPointer

      public void setPointer(Pointer p)
    • fromNative

      public Object fromNative(Object nativeValue, FromNativeContext context)
      The default implementation simply creates a new instance of the class and assigns its pointer field. Override if you need different behavior, such as ensuring a single PointerType instance for each unique Pointer value, or instantiating a different PointerType subclass.
      Angegeben von:
      fromNative in Schnittstelle NativeMapped
      Parameter:
      nativeValue - Java representation of the native type to be converted.
      context - Context in which the conversion is taking place.
      Gibt zurück:
      Converted object.
    • hashCode

      public int hashCode()
      The hash code for a PointerType is the same as that for its pointer.
      Setzt außer Kraft:
      hashCode in Klasse Object
    • equals

      public boolean equals(Object o)
      Instances of PointerType with identical pointers compare equal by default.
      Setzt außer Kraft:
      equals in Klasse Object
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object