Record Class InstructionSet.Defaults

java.lang.Object
java.lang.Record
org.applecommander.disassembler.api.InstructionSet.Defaults
Record Components:
startAddress - Common starting address for an application. Could be somewhat arbitrary.
libraryLabels - A default set of library labels. Commonly is "All" or "None".
bytesPerInstruction - Number of bytes commonly used in an expression. The disassembler does wrap after, so nothing is lost.
includeDescription - Some instruction sets (p-code in particular) include instruction descriptions that may be useful.
Enclosing interface:
InstructionSet

public static record InstructionSet.Defaults(int startAddress, List<String> libraryLabels, int bytesPerInstruction, boolean includeDescription) extends Record
Provides default values that are valid for the InstructionSet.
  • Constructor Details

    • Defaults

      public Defaults(int startAddress, List<String> libraryLabels, int bytesPerInstruction, boolean includeDescription)
      Creates an instance of a Defaults record class.
      Parameters:
      startAddress - the value for the startAddress record component
      libraryLabels - the value for the libraryLabels record component
      bytesPerInstruction - the value for the bytesPerInstruction record component
      includeDescription - the value for the includeDescription record component
  • Method Details

    • builder

      public static InstructionSet.Defaults.Builder builder()
      Initiate construction of a Defaults object.

      For example:

       
       return Defaults.builder()
                      .startAddress(0x300)
                      .libraryLabels("All")
                      .bytesPerInstruction(3)
                      .get();
       
       
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • startAddress

      public int startAddress()
      Returns the value of the startAddress record component.
      Returns:
      the value of the startAddress record component
    • libraryLabels

      public List<String> libraryLabels()
      Returns the value of the libraryLabels record component.
      Returns:
      the value of the libraryLabels record component
    • bytesPerInstruction

      public int bytesPerInstruction()
      Returns the value of the bytesPerInstruction record component.
      Returns:
      the value of the bytesPerInstruction record component
    • includeDescription

      public boolean includeDescription()
      Returns the value of the includeDescription record component.
      Returns:
      the value of the includeDescription record component