Class NativeArray

java.lang.Object
de.intarsys.nativec.type.NativeObject
de.intarsys.nativec.type.NativeArray
All Implemented Interfaces:
INativeObject

public class NativeArray extends NativeObject
An INativeObject that represents a homogeneous (this means of equal length and type) sequence of other INativeObject instances.
  • Field Details

  • Constructor Details

  • Method Details

    • create

      public static NativeArray create(INativeType baseType, int size)
    • 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.
    • getNativeObject

      public INativeObject getNativeObject(int index)
      The INativeObject at index in the sequence (the index'th element of the array).
      Parameters:
      index - The index of the element to be reported.
      Returns:
      The NativeObject at index
    • 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.
    • getSize

      public int getSize()
      The number of NativeObject instances in the sequence represented by this (in other terms the array size).
      Returns:
      The number of NativeObject instances in the sequence represented by this
    • getValue

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

      public Object getValue(int index)
    • setBaseType

      public void setBaseType(INativeType baseType)
    • setSize

      public void setSize(int size)
    • setValue

      public void setValue(int index, Object value)
    • 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.
    • toNestedString

      public String toNestedString()
      Description copied from class: NativeObject
      A string for debugging purposes.
      Overrides:
      toNestedString in class NativeObject
      Returns:
      A string for debugging purposes.
    • toString

      public String toString()
      Overrides:
      toString in class Object