Class WXMFlags.Builder

java.lang.Object
com.io7m.waxmill.machines.WXMFlags.Builder
Enclosing class:
WXMFlags

public static final class WXMFlags.Builder
extends java.lang.Object
Builds instances of type WXMFlags. Initialize attributes and then invoke the build() method to create an immutable instance.

Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

  • Method Details

    • from

      public final WXMFlags.Builder from​(WXMFlagsType instance)
      Fill a builder with attribute values from the provided WXMFlagsType instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • setIncludeGuestMemoryInCoreFiles

      public final WXMFlags.Builder setIncludeGuestMemoryInCoreFiles​(boolean includeGuestMemoryInCoreFiles)
      Initializes the value for the includeGuestMemoryInCoreFiles attribute.

      If not set, this attribute will have a default value as returned by the initializer of includeGuestMemoryInCoreFiles.

      Parameters:
      includeGuestMemoryInCoreFiles - The value for includeGuestMemoryInCoreFiles
      Returns:
      this builder for use in a chained invocation
    • setYieldCPUOnHLT

      public final WXMFlags.Builder setYieldCPUOnHLT​(boolean yieldCPUOnHLT)
      Initializes the value for the yieldCPUOnHLT attribute.

      If not set, this attribute will have a default value as returned by the initializer of yieldCPUOnHLT.

      Parameters:
      yieldCPUOnHLT - The value for yieldCPUOnHLT
      Returns:
      this builder for use in a chained invocation
    • setExitOnPAUSE

      public final WXMFlags.Builder setExitOnPAUSE​(boolean exitOnPAUSE)
      Initializes the value for the exitOnPAUSE attribute.

      If not set, this attribute will have a default value as returned by the initializer of exitOnPAUSE.

      Parameters:
      exitOnPAUSE - The value for exitOnPAUSE
      Returns:
      this builder for use in a chained invocation
    • setGenerateACPITables

      public final WXMFlags.Builder setGenerateACPITables​(boolean generateACPITables)
      Initializes the value for the generateACPITables attribute.

      If not set, this attribute will have a default value as returned by the initializer of generateACPITables.

      Parameters:
      generateACPITables - The value for generateACPITables
      Returns:
      this builder for use in a chained invocation
    • setDisableMPTableGeneration

      public final WXMFlags.Builder setDisableMPTableGeneration​(boolean disableMPTableGeneration)
      Initializes the value for the disableMPTableGeneration attribute.

      If not set, this attribute will have a default value as returned by the initializer of disableMPTableGeneration.

      Parameters:
      disableMPTableGeneration - The value for disableMPTableGeneration
      Returns:
      this builder for use in a chained invocation
    • setForceVirtualIOPCIToUseMSI

      public final WXMFlags.Builder setForceVirtualIOPCIToUseMSI​(boolean forceVirtualIOPCIToUseMSI)
      Initializes the value for the forceVirtualIOPCIToUseMSI attribute.

      If not set, this attribute will have a default value as returned by the initializer of forceVirtualIOPCIToUseMSI.

      Parameters:
      forceVirtualIOPCIToUseMSI - The value for forceVirtualIOPCIToUseMSI
      Returns:
      this builder for use in a chained invocation
    • setGuestAPICIsX2APIC

      public final WXMFlags.Builder setGuestAPICIsX2APIC​(boolean guestAPICIsX2APIC)
      Initializes the value for the guestAPICIsX2APIC attribute.

      If not set, this attribute will have a default value as returned by the initializer of guestAPICIsX2APIC.

      Parameters:
      guestAPICIsX2APIC - The value for guestAPICIsX2APIC
      Returns:
      this builder for use in a chained invocation
    • setWireGuestMemory

      public final WXMFlags.Builder setWireGuestMemory​(boolean wireGuestMemory)
      Initializes the value for the wireGuestMemory attribute.

      If not set, this attribute will have a default value as returned by the initializer of wireGuestMemory.

      Parameters:
      wireGuestMemory - The value for wireGuestMemory
      Returns:
      this builder for use in a chained invocation
    • setRealTimeClockIsUTC

      public final WXMFlags.Builder setRealTimeClockIsUTC​(boolean realTimeClockIsUTC)
      Initializes the value for the realTimeClockIsUTC attribute.

      If not set, this attribute will have a default value as returned by the initializer of realTimeClockIsUTC.

      Parameters:
      realTimeClockIsUTC - The value for realTimeClockIsUTC
      Returns:
      this builder for use in a chained invocation
    • build

      public WXMFlags build()
      Builds a new WXMFlags.
      Returns:
      An immutable instance of WXMFlags
      Throws:
      java.lang.IllegalStateException - if any required attributes are missing