Class NativeReference<T extends INativeObject>

java.lang.Object
de.intarsys.nativec.type.NativeObject
de.intarsys.nativec.type.NativeReference<T>
All Implemented Interfaces:
INativeObject

public class NativeReference<T extends INativeObject> extends NativeObject
An object representing a reference to another object ("pointer").
  • Field Details

  • Constructor Details

  • Method Details

    • create

      public static <U extends INativeObject> NativeReference<U> create(INativeType baseType)
    • getBaseType

      public INativeType getBaseType()
    • getByteCount

      public int getByteCount()
      Description copied from class: NativeObject
      The number of bytes occupied by this.
      Specified by:
      getByteCount in class NativeObject
      Returns:
      The number of bytes occupied by this.
    • getNativeType

      public INativeType getNativeType()
      Description copied from class: NativeObject
      The meta information and behavior for the NativeObject.

      There is exactly one meta instance for all NativeObject instances of a certain type.

      Specified by:
      getNativeType in interface INativeObject
      Specified by:
      getNativeType in class NativeObject
      Returns:
      The meta information and behavior for the NativeObject.
    • getReferencedAddress

      public long getReferencedAddress()
    • getValue

      public T getValue()
      Description copied from interface: INativeObject
      A Java side representation from the memory.
      Returns:
      A Java side representation for the INativeObject.
    • setBaseType

      public void setBaseType(INativeType baseType)
    • setValue

      public void setValue(Object value)
      Description copied from interface: INativeObject
      Assign (and marshall to memory) the Java side representation.
      Parameters:
      value - The new Java value.
    • toString

      public String toString()
      Overrides:
      toString in class Object