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.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Initiate construction of a Defaults object.int
Returns the value of thebytesPerInstruction
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
Returns the value of theincludeDescription
record component.Returns the value of thelibraryLabels
record component.int
Returns the value of thestartAddress
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Defaults
public Defaults(int startAddress, List<String> libraryLabels, int bytesPerInstruction, boolean includeDescription) Creates an instance of aDefaults
record class.- Parameters:
startAddress
- the value for thestartAddress
record componentlibraryLabels
- the value for thelibraryLabels
record componentbytesPerInstruction
- the value for thebytesPerInstruction
record componentincludeDescription
- the value for theincludeDescription
record component
-
-
Method Details
-
builder
Initiate construction of a Defaults object. For example:return Defaults.builder() .startAddress(0x300) .libraryLabels("All") .bytesPerInstruction(3) .get();
-
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. -
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. -
equals
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 withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
startAddress
public int startAddress()Returns the value of thestartAddress
record component.- Returns:
- the value of the
startAddress
record component
-
libraryLabels
Returns the value of thelibraryLabels
record component.- Returns:
- the value of the
libraryLabels
record component
-
bytesPerInstruction
public int bytesPerInstruction()Returns the value of thebytesPerInstruction
record component.- Returns:
- the value of the
bytesPerInstruction
record component
-
includeDescription
public boolean includeDescription()Returns the value of theincludeDescription
record component.- Returns:
- the value of the
includeDescription
record component
-