Interface Position
- All Known Subinterfaces:
PositionForCompilation
,PositionForInterpretation
public interface Position
Marks a position within the tuple list (queue).
- Author:
- Danny Daglas
-
Method Summary
Modifier and TypeMethodDescriptionObtain the address argument for this tuple.arg
(int idx) Get a reference to a particular element within the tuple.boolean
boolArg
(int idx) Get the boolean representation for a particular element within the tuple.Class<?>
classArg()
Obtain the class argument for this tuple.long
intArg
(int idx) Get the integer representation for a particular element within the tuple.boolean
isEOF()
isEOF.int
Get the source line number for this position.void
next()
Advances the position to the next tuple, as ordered within the tuple list (queue).int
opcode()
opcode.
-
Method Details
-
isEOF
boolean isEOF()isEOF.
- Returns:
- true whether we are at the end of the tuple list, false otherwise
-
next
void next()Advances the position to the next tuple, as ordered within the tuple list (queue). -
opcode
int opcode()opcode.
- Returns:
- the opcode for the tuple at this position
-
intArg
long intArg(int idx) Get the integer representation for a particular element within the tuple.- Parameters:
idx
- The item to retrieve from the tuple.- Returns:
- the integer representation of the item.
-
boolArg
boolean boolArg(int idx) Get the boolean representation for a particular element within the tuple.- Parameters:
idx
- The item to retrieve from the tuple.- Returns:
- the boolean representation of the item.
-
arg
Get a reference to a particular element within the tuple.- Parameters:
idx
- The item to retrieve from the tuple.- Returns:
- a reference to the item.
-
addressArg
Address addressArg()Obtain the address argument for this tuple.This is a special form in that the tuple has only the address argument, and nothing else.
- Returns:
- a
Address
object
-
classArg
Class<?> classArg()Obtain the class argument for this tuple.This is a special form in that the tuple has only the class argument, and nothing else.
- Returns:
- a
Class
object
-
lineNumber
int lineNumber()Get the source line number for this position.- Returns:
- a int
-