Class WindowsPeOptionalHeader

java.lang.Object
security.whisper.javastix.coo.types.WindowsPeOptionalHeader
All Implemented Interfaces:
Serializable, StixCustomProperties, WindowsPeOptionalHeaderObj, GenericValidation, SdoDefaultValidator

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class WindowsPeOptionalHeader extends Object implements WindowsPeOptionalHeaderObj
The Windows PE Optional Header type represents the properties of the PE optional header.
See Also:
  • Method Details

    • getMagicHex

      @JsonPropertyDescription("Specifies the unsigned Optional<Integer> that indicates the type of the PE binary.") public Optional<String> getMagicHex()
      Specified by:
      getMagicHex in interface WindowsPeOptionalHeaderObj
      Returns:
      The value of the magicHex attribute
    • getMajorLinkerVersion

      @JsonPropertyDescription("Specifies the linker major version number.") public Optional<Long> getMajorLinkerVersion()
      Specified by:
      getMajorLinkerVersion in interface WindowsPeOptionalHeaderObj
      Returns:
      The value of the majorLinkerVersion attribute
    • getMinorLinkerVersion

      @JsonPropertyDescription("Specifies the linker minor version number.") public Optional<Long> getMinorLinkerVersion()
      Specified by:
      getMinorLinkerVersion in interface WindowsPeOptionalHeaderObj
      Returns:
      The value of the minorLinkerVersion attribute
    • getSizeOfCode

      @JsonPropertyDescription("Specifies the size of the code (text) section. If there are multiple such sections, this refers to the sum of the sizes of each section.") public Optional<Long> getSizeOfCode()
      Specified by:
      getSizeOfCode in interface WindowsPeOptionalHeaderObj
      Returns:
      The value of the sizeOfCode attribute
    • getSizeOfInitializedData

      @JsonPropertyDescription("Specifies the size of the initialized data section. If there are multiple such sections, this refers to the sum of the sizes of each section.") public Optional<Long> getSizeOfInitializedData()
      Specified by:
      getSizeOfInitializedData in interface WindowsPeOptionalHeaderObj
      Returns:
      The value of the sizeOfInitializedData attribute
    • getSizeOfUninitializedData

      @JsonPropertyDescription("Specifies the size of the uninitialized data section. If there are multiple such sections, this refers to the sum of the sizes of each section.") public Optional<Long> getSizeOfUninitializedData()
      Specified by:
      getSizeOfUninitializedData in interface WindowsPeOptionalHeaderObj
      Returns:
      The value of the sizeOfUninitializedData attribute
    • getAddressOfEntryPoint

      @JsonPropertyDescription("Specifies the address of the entry point relative to the image base when the executable is loaded into memory.") public Optional<Long> getAddressOfEntryPoint()
      Specified by:
      getAddressOfEntryPoint in interface WindowsPeOptionalHeaderObj
      Returns:
      The value of the addressOfEntryPoint attribute
    • getBaseOfCode

      @JsonPropertyDescription("Specifies the address that is relative to the image base of the beginning-of-code section when it is loaded into memory.") public Optional<Long> getBaseOfCode()
      Specified by:
      getBaseOfCode in interface WindowsPeOptionalHeaderObj
      Returns:
      The value of the baseOfCode attribute
    • getBaseOfData

      @JsonPropertyDescription("Specifies the address that is relative to the image base of the beginning-of-data section when it is loaded into memory.") public Optional<Long> getBaseOfData()
      Specified by:
      getBaseOfData in interface WindowsPeOptionalHeaderObj
      Returns:
      The value of the baseOfData attribute
    • getImageBase

      @JsonPropertyDescription("Specifies the preferred address of the first byte of the image when loaded into memory.") public Optional<Long> getImageBase()
      Specified by:
      getImageBase in interface WindowsPeOptionalHeaderObj
      Returns:
      The value of the imageBase attribute
    • getSectionAlignment

      @JsonPropertyDescription("Specifies the alignment (in bytes) of PE sections when they are loaded into memory.") public Optional<Long> getSectionAlignment()
      Specified by:
      getSectionAlignment in interface WindowsPeOptionalHeaderObj
      Returns:
      The value of the sectionAlignment attribute
    • getFileAlignment

      @JsonPropertyDescription("Specifies the factor (in bytes) that is used to align the raw data of sections in the image file.") public Optional<Long> getFileAlignment()
      Specified by:
      getFileAlignment in interface WindowsPeOptionalHeaderObj
      Returns:
      The value of the fileAlignment attribute
    • getMajorOsVersion

      @JsonPropertyDescription("Specifies the major version number of the required operating system.") public Optional<Long> getMajorOsVersion()
      Specified by:
      getMajorOsVersion in interface WindowsPeOptionalHeaderObj
      Returns:
      The value of the majorOsVersion attribute
    • getMinorOsVersion

      @JsonPropertyDescription("Specifies the minor version number of the required operating system.") public Optional<Long> getMinorOsVersion()
      Specified by:
      getMinorOsVersion in interface WindowsPeOptionalHeaderObj
      Returns:
      The value of the minorOsVersion attribute
    • getMajorImageVersion

      @JsonPropertyDescription("Specifies the major version number of the image.") public Optional<Long> getMajorImageVersion()
      Specified by:
      getMajorImageVersion in interface WindowsPeOptionalHeaderObj
      Returns:
      The value of the majorImageVersion attribute
    • getMinorImageVersion

      @JsonPropertyDescription("Specifies the minor version number of the image.") public Optional<Long> getMinorImageVersion()
      Specified by:
      getMinorImageVersion in interface WindowsPeOptionalHeaderObj
      Returns:
      The value of the minorImageVersion attribute
    • getMajorSubsystemVersion

      @JsonPropertyDescription("Specifies the major version number of the subsystem.") public Optional<Long> getMajorSubsystemVersion()
      Specified by:
      getMajorSubsystemVersion in interface WindowsPeOptionalHeaderObj
      Returns:
      The value of the majorSubsystemVersion attribute
    • getMinorSubsystemVersion

      @JsonPropertyDescription("Specifies the minor version number of the subsystem.") public Optional<Long> getMinorSubsystemVersion()
      Specified by:
      getMinorSubsystemVersion in interface WindowsPeOptionalHeaderObj
      Returns:
      The value of the minorSubsystemVersion attribute
    • getWin32VersionValueHex

      @JsonPropertyDescription("Specifies the reserved win32 version value.") public Optional<String> getWin32VersionValueHex()
      Specified by:
      getWin32VersionValueHex in interface WindowsPeOptionalHeaderObj
      Returns:
      The value of the win32VersionValueHex attribute
    • getSizeOfImage

      @JsonPropertyDescription("Specifies the size, in bytes, of the image, including all headers, as the image is loaded in memory.") public Optional<Long> getSizeOfImage()
      Specified by:
      getSizeOfImage in interface WindowsPeOptionalHeaderObj
      Returns:
      The value of the sizeOfImage attribute
    • getSizeOfHeaders

      @JsonPropertyDescription("Specifies the combined size of the MS-DOS, PE header, and section headers, rounded up a multiple of the value specified in the file_alignment header.") public Optional<Long> getSizeOfHeaders()
      Specified by:
      getSizeOfHeaders in interface WindowsPeOptionalHeaderObj
      Returns:
      The value of the sizeOfHeaders attribute
    • getChecksumHex

      @JsonPropertyDescription("Specifies the checksum of the PE binary.") public Optional<String> getChecksumHex()
      Specified by:
      getChecksumHex in interface WindowsPeOptionalHeaderObj
      Returns:
      The value of the checksumHex attribute
    • getSubsystemHex

      @JsonPropertyDescription("Specifies the subsystem (e.g., GUI, device driver, etc.) that is required to run this image.") public Optional<String> getSubsystemHex()
      Specified by:
      getSubsystemHex in interface WindowsPeOptionalHeaderObj
      Returns:
      The value of the subsystemHex attribute
    • getDllCharacteristicsHex

      @JsonPropertyDescription("Specifies the flags that characterize the PE binary.") public Optional<String> getDllCharacteristicsHex()
      Specified by:
      getDllCharacteristicsHex in interface WindowsPeOptionalHeaderObj
      Returns:
      The value of the dllCharacteristicsHex attribute
    • getSizeOfStackReserve

      @JsonPropertyDescription("Specifies the size of the stack to reserve") public Optional<Long> getSizeOfStackReserve()
      Specified by:
      getSizeOfStackReserve in interface WindowsPeOptionalHeaderObj
      Returns:
      The value of the sizeOfStackReserve attribute
    • getSizeOfStackCommit

      @JsonPropertyDescription("Specifies the size of the stack to commit.") public Optional<Long> getSizeOfStackCommit()
      Specified by:
      getSizeOfStackCommit in interface WindowsPeOptionalHeaderObj
      Returns:
      The value of the sizeOfStackCommit attribute
    • getSizeOfHeapReserve

      @JsonPropertyDescription("Specifies the size of the local heap space to reserve.") public Optional<Long> getSizeOfHeapReserve()
      Specified by:
      getSizeOfHeapReserve in interface WindowsPeOptionalHeaderObj
      Returns:
      The value of the sizeOfHeapReserve attribute
    • getSizeOfHeapCommit

      @JsonPropertyDescription("Specifies the size of the local heap space to commit.") public Optional<Long> getSizeOfHeapCommit()
      Specified by:
      getSizeOfHeapCommit in interface WindowsPeOptionalHeaderObj
      Returns:
      The value of the sizeOfHeapCommit attribute
    • getLoaderFlagsHex

      @JsonPropertyDescription("Specifies the reserved loader flags.") public Optional<String> getLoaderFlagsHex()
      Specified by:
      getLoaderFlagsHex in interface WindowsPeOptionalHeaderObj
      Returns:
      The value of the loaderFlagsHex attribute
    • getNumberOfRvaAndSizes

      @JsonPropertyDescription("Specifies the number of data-directory entries in the remainder of the optional header.") public Optional<Long> getNumberOfRvaAndSizes()
      Specified by:
      getNumberOfRvaAndSizes in interface WindowsPeOptionalHeaderObj
      Returns:
      The value of the numberOfRvaAndSizes attribute
    • getHashes

      @JsonPropertyDescription("Specifies any hashes that were computed for the optional header.") public com.google.common.collect.ImmutableMap<String,String> getHashes()
      Specified by:
      getHashes in interface WindowsPeOptionalHeaderObj
      Returns:
      The value of the hashes attribute
    • getCustomProperties

      public com.google.common.collect.ImmutableMap<String,Object> getCustomProperties()
      Custom Properties for STIX Objects. Any object that supports custom properties will have a validation of the custom property prefix (typically "x_"). If the additional property in the JSON does not meet the StartsWith condition, then the JSON will be rejected.
      Specified by:
      getCustomProperties in interface StixCustomProperties
      Returns:
      Map of custom properties Map<String, Object>
    • withMagicHex

      public final WindowsPeOptionalHeader withMagicHex(String value)
      Copy the current immutable object by setting a present value for the optional magicHex attribute.
      Parameters:
      value - The value for magicHex
      Returns:
      A modified copy of this object
    • withMagicHex

      public final WindowsPeOptionalHeader withMagicHex(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the magicHex attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for magicHex
      Returns:
      A modified copy of this object
    • withMajorLinkerVersion

      public final WindowsPeOptionalHeader withMajorLinkerVersion(long value)
      Copy the current immutable object by setting a present value for the optional majorLinkerVersion attribute.
      Parameters:
      value - The value for majorLinkerVersion
      Returns:
      A modified copy of this object
    • withMajorLinkerVersion

      public final WindowsPeOptionalHeader withMajorLinkerVersion(Optional<Long> optional)
      Copy the current immutable object by setting an optional value for the majorLinkerVersion attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for majorLinkerVersion
      Returns:
      A modified copy of this object
    • withMinorLinkerVersion

      public final WindowsPeOptionalHeader withMinorLinkerVersion(long value)
      Copy the current immutable object by setting a present value for the optional minorLinkerVersion attribute.
      Parameters:
      value - The value for minorLinkerVersion
      Returns:
      A modified copy of this object
    • withMinorLinkerVersion

      public final WindowsPeOptionalHeader withMinorLinkerVersion(Optional<Long> optional)
      Copy the current immutable object by setting an optional value for the minorLinkerVersion attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for minorLinkerVersion
      Returns:
      A modified copy of this object
    • withSizeOfCode

      public final WindowsPeOptionalHeader withSizeOfCode(long value)
      Copy the current immutable object by setting a present value for the optional sizeOfCode attribute.
      Parameters:
      value - The value for sizeOfCode
      Returns:
      A modified copy of this object
    • withSizeOfCode

      public final WindowsPeOptionalHeader withSizeOfCode(Optional<Long> optional)
      Copy the current immutable object by setting an optional value for the sizeOfCode attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for sizeOfCode
      Returns:
      A modified copy of this object
    • withSizeOfInitializedData

      public final WindowsPeOptionalHeader withSizeOfInitializedData(long value)
      Copy the current immutable object by setting a present value for the optional sizeOfInitializedData attribute.
      Parameters:
      value - The value for sizeOfInitializedData
      Returns:
      A modified copy of this object
    • withSizeOfInitializedData

      public final WindowsPeOptionalHeader withSizeOfInitializedData(Optional<Long> optional)
      Copy the current immutable object by setting an optional value for the sizeOfInitializedData attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for sizeOfInitializedData
      Returns:
      A modified copy of this object
    • withSizeOfUninitializedData

      public final WindowsPeOptionalHeader withSizeOfUninitializedData(long value)
      Copy the current immutable object by setting a present value for the optional sizeOfUninitializedData attribute.
      Parameters:
      value - The value for sizeOfUninitializedData
      Returns:
      A modified copy of this object
    • withSizeOfUninitializedData

      public final WindowsPeOptionalHeader withSizeOfUninitializedData(Optional<Long> optional)
      Copy the current immutable object by setting an optional value for the sizeOfUninitializedData attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for sizeOfUninitializedData
      Returns:
      A modified copy of this object
    • withAddressOfEntryPoint

      public final WindowsPeOptionalHeader withAddressOfEntryPoint(long value)
      Copy the current immutable object by setting a present value for the optional addressOfEntryPoint attribute.
      Parameters:
      value - The value for addressOfEntryPoint
      Returns:
      A modified copy of this object
    • withAddressOfEntryPoint

      public final WindowsPeOptionalHeader withAddressOfEntryPoint(Optional<Long> optional)
      Copy the current immutable object by setting an optional value for the addressOfEntryPoint attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for addressOfEntryPoint
      Returns:
      A modified copy of this object
    • withBaseOfCode

      public final WindowsPeOptionalHeader withBaseOfCode(long value)
      Copy the current immutable object by setting a present value for the optional baseOfCode attribute.
      Parameters:
      value - The value for baseOfCode
      Returns:
      A modified copy of this object
    • withBaseOfCode

      public final WindowsPeOptionalHeader withBaseOfCode(Optional<Long> optional)
      Copy the current immutable object by setting an optional value for the baseOfCode attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for baseOfCode
      Returns:
      A modified copy of this object
    • withBaseOfData

      public final WindowsPeOptionalHeader withBaseOfData(long value)
      Copy the current immutable object by setting a present value for the optional baseOfData attribute.
      Parameters:
      value - The value for baseOfData
      Returns:
      A modified copy of this object
    • withBaseOfData

      public final WindowsPeOptionalHeader withBaseOfData(Optional<Long> optional)
      Copy the current immutable object by setting an optional value for the baseOfData attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for baseOfData
      Returns:
      A modified copy of this object
    • withImageBase

      public final WindowsPeOptionalHeader withImageBase(long value)
      Copy the current immutable object by setting a present value for the optional imageBase attribute.
      Parameters:
      value - The value for imageBase
      Returns:
      A modified copy of this object
    • withImageBase

      public final WindowsPeOptionalHeader withImageBase(Optional<Long> optional)
      Copy the current immutable object by setting an optional value for the imageBase attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for imageBase
      Returns:
      A modified copy of this object
    • withSectionAlignment

      public final WindowsPeOptionalHeader withSectionAlignment(long value)
      Copy the current immutable object by setting a present value for the optional sectionAlignment attribute.
      Parameters:
      value - The value for sectionAlignment
      Returns:
      A modified copy of this object
    • withSectionAlignment

      public final WindowsPeOptionalHeader withSectionAlignment(Optional<Long> optional)
      Copy the current immutable object by setting an optional value for the sectionAlignment attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for sectionAlignment
      Returns:
      A modified copy of this object
    • withFileAlignment

      public final WindowsPeOptionalHeader withFileAlignment(long value)
      Copy the current immutable object by setting a present value for the optional fileAlignment attribute.
      Parameters:
      value - The value for fileAlignment
      Returns:
      A modified copy of this object
    • withFileAlignment

      public final WindowsPeOptionalHeader withFileAlignment(Optional<Long> optional)
      Copy the current immutable object by setting an optional value for the fileAlignment attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for fileAlignment
      Returns:
      A modified copy of this object
    • withMajorOsVersion

      public final WindowsPeOptionalHeader withMajorOsVersion(long value)
      Copy the current immutable object by setting a present value for the optional majorOsVersion attribute.
      Parameters:
      value - The value for majorOsVersion
      Returns:
      A modified copy of this object
    • withMajorOsVersion

      public final WindowsPeOptionalHeader withMajorOsVersion(Optional<Long> optional)
      Copy the current immutable object by setting an optional value for the majorOsVersion attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for majorOsVersion
      Returns:
      A modified copy of this object
    • withMinorOsVersion

      public final WindowsPeOptionalHeader withMinorOsVersion(long value)
      Copy the current immutable object by setting a present value for the optional minorOsVersion attribute.
      Parameters:
      value - The value for minorOsVersion
      Returns:
      A modified copy of this object
    • withMinorOsVersion

      public final WindowsPeOptionalHeader withMinorOsVersion(Optional<Long> optional)
      Copy the current immutable object by setting an optional value for the minorOsVersion attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for minorOsVersion
      Returns:
      A modified copy of this object
    • withMajorImageVersion

      public final WindowsPeOptionalHeader withMajorImageVersion(long value)
      Copy the current immutable object by setting a present value for the optional majorImageVersion attribute.
      Parameters:
      value - The value for majorImageVersion
      Returns:
      A modified copy of this object
    • withMajorImageVersion

      public final WindowsPeOptionalHeader withMajorImageVersion(Optional<Long> optional)
      Copy the current immutable object by setting an optional value for the majorImageVersion attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for majorImageVersion
      Returns:
      A modified copy of this object
    • withMinorImageVersion

      public final WindowsPeOptionalHeader withMinorImageVersion(long value)
      Copy the current immutable object by setting a present value for the optional minorImageVersion attribute.
      Parameters:
      value - The value for minorImageVersion
      Returns:
      A modified copy of this object
    • withMinorImageVersion

      public final WindowsPeOptionalHeader withMinorImageVersion(Optional<Long> optional)
      Copy the current immutable object by setting an optional value for the minorImageVersion attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for minorImageVersion
      Returns:
      A modified copy of this object
    • withMajorSubsystemVersion

      public final WindowsPeOptionalHeader withMajorSubsystemVersion(long value)
      Copy the current immutable object by setting a present value for the optional majorSubsystemVersion attribute.
      Parameters:
      value - The value for majorSubsystemVersion
      Returns:
      A modified copy of this object
    • withMajorSubsystemVersion

      public final WindowsPeOptionalHeader withMajorSubsystemVersion(Optional<Long> optional)
      Copy the current immutable object by setting an optional value for the majorSubsystemVersion attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for majorSubsystemVersion
      Returns:
      A modified copy of this object
    • withMinorSubsystemVersion

      public final WindowsPeOptionalHeader withMinorSubsystemVersion(long value)
      Copy the current immutable object by setting a present value for the optional minorSubsystemVersion attribute.
      Parameters:
      value - The value for minorSubsystemVersion
      Returns:
      A modified copy of this object
    • withMinorSubsystemVersion

      public final WindowsPeOptionalHeader withMinorSubsystemVersion(Optional<Long> optional)
      Copy the current immutable object by setting an optional value for the minorSubsystemVersion attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for minorSubsystemVersion
      Returns:
      A modified copy of this object
    • withWin32VersionValueHex

      public final WindowsPeOptionalHeader withWin32VersionValueHex(String value)
      Copy the current immutable object by setting a present value for the optional win32VersionValueHex attribute.
      Parameters:
      value - The value for win32VersionValueHex
      Returns:
      A modified copy of this object
    • withWin32VersionValueHex

      public final WindowsPeOptionalHeader withWin32VersionValueHex(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the win32VersionValueHex attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for win32VersionValueHex
      Returns:
      A modified copy of this object
    • withSizeOfImage

      public final WindowsPeOptionalHeader withSizeOfImage(long value)
      Copy the current immutable object by setting a present value for the optional sizeOfImage attribute.
      Parameters:
      value - The value for sizeOfImage
      Returns:
      A modified copy of this object
    • withSizeOfImage

      public final WindowsPeOptionalHeader withSizeOfImage(Optional<Long> optional)
      Copy the current immutable object by setting an optional value for the sizeOfImage attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for sizeOfImage
      Returns:
      A modified copy of this object
    • withSizeOfHeaders

      public final WindowsPeOptionalHeader withSizeOfHeaders(long value)
      Copy the current immutable object by setting a present value for the optional sizeOfHeaders attribute.
      Parameters:
      value - The value for sizeOfHeaders
      Returns:
      A modified copy of this object
    • withSizeOfHeaders

      public final WindowsPeOptionalHeader withSizeOfHeaders(Optional<Long> optional)
      Copy the current immutable object by setting an optional value for the sizeOfHeaders attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for sizeOfHeaders
      Returns:
      A modified copy of this object
    • withChecksumHex

      public final WindowsPeOptionalHeader withChecksumHex(String value)
      Copy the current immutable object by setting a present value for the optional checksumHex attribute.
      Parameters:
      value - The value for checksumHex
      Returns:
      A modified copy of this object
    • withChecksumHex

      public final WindowsPeOptionalHeader withChecksumHex(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the checksumHex attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for checksumHex
      Returns:
      A modified copy of this object
    • withSubsystemHex

      public final WindowsPeOptionalHeader withSubsystemHex(String value)
      Copy the current immutable object by setting a present value for the optional subsystemHex attribute.
      Parameters:
      value - The value for subsystemHex
      Returns:
      A modified copy of this object
    • withSubsystemHex

      public final WindowsPeOptionalHeader withSubsystemHex(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the subsystemHex attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for subsystemHex
      Returns:
      A modified copy of this object
    • withDllCharacteristicsHex

      public final WindowsPeOptionalHeader withDllCharacteristicsHex(String value)
      Copy the current immutable object by setting a present value for the optional dllCharacteristicsHex attribute.
      Parameters:
      value - The value for dllCharacteristicsHex
      Returns:
      A modified copy of this object
    • withDllCharacteristicsHex

      public final WindowsPeOptionalHeader withDllCharacteristicsHex(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the dllCharacteristicsHex attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for dllCharacteristicsHex
      Returns:
      A modified copy of this object
    • withSizeOfStackReserve

      public final WindowsPeOptionalHeader withSizeOfStackReserve(long value)
      Copy the current immutable object by setting a present value for the optional sizeOfStackReserve attribute.
      Parameters:
      value - The value for sizeOfStackReserve
      Returns:
      A modified copy of this object
    • withSizeOfStackReserve

      public final WindowsPeOptionalHeader withSizeOfStackReserve(Optional<Long> optional)
      Copy the current immutable object by setting an optional value for the sizeOfStackReserve attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for sizeOfStackReserve
      Returns:
      A modified copy of this object
    • withSizeOfStackCommit

      public final WindowsPeOptionalHeader withSizeOfStackCommit(long value)
      Copy the current immutable object by setting a present value for the optional sizeOfStackCommit attribute.
      Parameters:
      value - The value for sizeOfStackCommit
      Returns:
      A modified copy of this object
    • withSizeOfStackCommit

      public final WindowsPeOptionalHeader withSizeOfStackCommit(Optional<Long> optional)
      Copy the current immutable object by setting an optional value for the sizeOfStackCommit attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for sizeOfStackCommit
      Returns:
      A modified copy of this object
    • withSizeOfHeapReserve

      public final WindowsPeOptionalHeader withSizeOfHeapReserve(long value)
      Copy the current immutable object by setting a present value for the optional sizeOfHeapReserve attribute.
      Parameters:
      value - The value for sizeOfHeapReserve
      Returns:
      A modified copy of this object
    • withSizeOfHeapReserve

      public final WindowsPeOptionalHeader withSizeOfHeapReserve(Optional<Long> optional)
      Copy the current immutable object by setting an optional value for the sizeOfHeapReserve attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for sizeOfHeapReserve
      Returns:
      A modified copy of this object
    • withSizeOfHeapCommit

      public final WindowsPeOptionalHeader withSizeOfHeapCommit(long value)
      Copy the current immutable object by setting a present value for the optional sizeOfHeapCommit attribute.
      Parameters:
      value - The value for sizeOfHeapCommit
      Returns:
      A modified copy of this object
    • withSizeOfHeapCommit

      public final WindowsPeOptionalHeader withSizeOfHeapCommit(Optional<Long> optional)
      Copy the current immutable object by setting an optional value for the sizeOfHeapCommit attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for sizeOfHeapCommit
      Returns:
      A modified copy of this object
    • withLoaderFlagsHex

      public final WindowsPeOptionalHeader withLoaderFlagsHex(String value)
      Copy the current immutable object by setting a present value for the optional loaderFlagsHex attribute.
      Parameters:
      value - The value for loaderFlagsHex
      Returns:
      A modified copy of this object
    • withLoaderFlagsHex

      public final WindowsPeOptionalHeader withLoaderFlagsHex(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the loaderFlagsHex attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for loaderFlagsHex
      Returns:
      A modified copy of this object
    • withNumberOfRvaAndSizes

      public final WindowsPeOptionalHeader withNumberOfRvaAndSizes(long value)
      Copy the current immutable object by setting a present value for the optional numberOfRvaAndSizes attribute.
      Parameters:
      value - The value for numberOfRvaAndSizes
      Returns:
      A modified copy of this object
    • withNumberOfRvaAndSizes

      public final WindowsPeOptionalHeader withNumberOfRvaAndSizes(Optional<Long> optional)
      Copy the current immutable object by setting an optional value for the numberOfRvaAndSizes attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for numberOfRvaAndSizes
      Returns:
      A modified copy of this object
    • withHashes

      public final WindowsPeOptionalHeader withHashes(Map<String,? extends String> entries)
      Copy the current immutable object by replacing the hashes map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      entries - The entries to be added to the hashes map
      Returns:
      A modified copy of this object
    • withCustomProperties

      public final WindowsPeOptionalHeader withCustomProperties(Map<String,? extends Object> entries)
      Copy the current immutable object by replacing the customProperties map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      entries - The entries to be added to the customProperties map
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of WindowsPeOptionalHeader that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: magicHex, majorLinkerVersion, minorLinkerVersion, sizeOfCode, sizeOfInitializedData, sizeOfUninitializedData, addressOfEntryPoint, baseOfCode, baseOfData, imageBase, sectionAlignment, fileAlignment, majorOsVersion, minorOsVersion, majorImageVersion, minorImageVersion, majorSubsystemVersion, minorSubsystemVersion, win32VersionValueHex, sizeOfImage, sizeOfHeaders, checksumHex, subsystemHex, dllCharacteristicsHex, sizeOfStackReserve, sizeOfStackCommit, sizeOfHeapReserve, sizeOfHeapCommit, loaderFlagsHex, numberOfRvaAndSizes, hashes, customProperties.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value WindowsPeOptionalHeader with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static WindowsPeOptionalHeader copyOf(WindowsPeOptionalHeaderObj instance)
      Creates an immutable copy of a WindowsPeOptionalHeaderObj value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable WindowsPeOptionalHeader instance
    • builder

      public static WindowsPeOptionalHeader.Builder builder()
      Creates a builder for WindowsPeOptionalHeader.
      Returns:
      A new WindowsPeOptionalHeader builder