Class NativeStruct

java.lang.Object
de.intarsys.nativec.type.NativeObject
de.intarsys.nativec.type.NativeStruct
All Implemented Interfaces:
INativeObject
Direct Known Subclasses:
NativeGenericStruct, NativeStaticStruct

public abstract class NativeStruct extends NativeObject
An abstract superclass for the implementation of structured NativeObject instances. These objects are built using named slots with other INativeObject instances (as opposed to NativeArray, using indexed slots).
  • Field Details

  • Constructor Details

    • NativeStruct

      public NativeStruct()
    • NativeStruct

      public NativeStruct(INativeHandle handle)
  • Method Details

    • 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(String name)
      The NativeObject at the named slot name.

      The marshalling is delegated to the StructMember in the StructDeclaration.

      Parameters:
      name - The name of the slot in the structure.
      Returns:
      The NativeObject at the named slot name.
    • getStructField

      protected StructMember getStructField(String name)
    • getStructType

      public NativeStructType getStructType()
    • getValue

      public Object getValue()
      Description copied from interface: INativeObject
      A Java side representation from the memory.
      Returns:
      A Java side representation for the INativeObject.
    • 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