Package ai.timefold.jpyinterpreter
Record Class PythonBytecodeInstruction
java.lang.Object
java.lang.Record
ai.timefold.jpyinterpreter.PythonBytecodeInstruction
public record PythonBytecodeInstruction(String opname, int offset, int arg, String argRepr, OptionalInt startsLine, boolean isJumpTarget)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionPythonBytecodeInstruction(String opname, int offset, int arg, String argRepr, OptionalInt startsLine, boolean isJumpTarget) Creates an instance of aPythonBytecodeInstructionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintarg()Returns the value of theargrecord component.argRepr()Returns the value of theargReprrecord component.static PythonBytecodeInstructionatOffset(OpcodeDescriptor instruction, int offset) static PythonBytecodeInstructionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisJumpTargetrecord component.intoffset()Returns the value of theoffsetrecord component.opname()Returns the value of theopnamerecord component.Returns the value of thestartsLinerecord component.startsLine(int lineNumber) toString()Returns a string representation of this record class.withArg(int newArg) withArgRepr(String newArgRepr) withIsJumpTarget(boolean isJumpTarget)
-
Constructor Details
-
PythonBytecodeInstruction
public PythonBytecodeInstruction(String opname, int offset, int arg, String argRepr, OptionalInt startsLine, boolean isJumpTarget) Creates an instance of aPythonBytecodeInstructionrecord class.- Parameters:
opname- the value for theopnamerecord componentoffset- the value for theoffsetrecord componentarg- the value for theargrecord componentargRepr- the value for theargReprrecord componentstartsLine- the value for thestartsLinerecord componentisJumpTarget- the value for theisJumpTargetrecord component
-
-
Method Details
-
atOffset
-
atOffset
-
withArg
-
withArgRepr
-
startsLine
-
withIsJumpTarget
-
markAsJumpTarget
-
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 '=='. -
opname
Returns the value of theopnamerecord component.- Returns:
- the value of the
opnamerecord component
-
offset
public int offset()Returns the value of theoffsetrecord component.- Returns:
- the value of the
offsetrecord component
-
arg
public int arg()Returns the value of theargrecord component.- Returns:
- the value of the
argrecord component
-
argRepr
Returns the value of theargReprrecord component.- Returns:
- the value of the
argReprrecord component
-
startsLine
Returns the value of thestartsLinerecord component.- Returns:
- the value of the
startsLinerecord component
-
isJumpTarget
public boolean isJumpTarget()Returns the value of theisJumpTargetrecord component.- Returns:
- the value of the
isJumpTargetrecord component
-