Package org.libvirt

Class TypedParameter

java.lang.Object
org.libvirt.TypedParameter
Direct Known Subclasses:
TypedBooleanParameter, TypedDoubleParameter, TypedIntParameter, TypedLongParameter, TypedStringParameter, TypedUintParameter, TypedUlongParameter

public abstract class TypedParameter extends Object
  • Field Details

  • Constructor Details

    • TypedParameter

      public TypedParameter()
  • Method Details

    • getType

      public abstract int getType()
      The type of the parameter
      Returns:
      the Type of the parameter
    • getTypeAsString

      public abstract String getTypeAsString()
      Utility function for displaying the type
      Returns:
      the Type of the parameter as string
    • getValueAsString

      public abstract String getValueAsString()
      Utility function for displaying the value
      Returns:
      the value of the parameter in String form
    • create

      public static TypedParameter create(virTypedParameter vParam)
    • toNative

      public static virTypedParameter toNative(TypedParameter param)
    • copyOf

      public static byte[] copyOf(byte[] original, int length)
    • fromPointer

      public static TypedParameter[] fromPointer(com.sun.jna.Pointer ptr, int n)
    • toArray

      public static TypedParameter[] toArray(com.sun.jna.Pointer ptr, int n)
      Convert a native virTypedParameter array to Java TypedParameter objects without releasing the native memory.

      Use this when the native array is owned by another allocator (for example, virConnectGetAllDomainStats, whose records are freed by virDomainStatsRecordListFree).