public abstract class OperationReference
extends Object
Constructor and Description |
---|
OperationReference() |
Modifier and Type | Method and Description |
---|---|
abstract void |
execute(Task task)
Executes this operation for the specified task.
|
protected static void |
fail()
Fails silently.
|
protected static void |
fail(String message)
Fails with a message.
|
abstract Operation |
getOperation()
Gets the operation.
|
int |
getPosition()
Gets the position in the source.
|
void |
setPosition(int position)
Sets the position in the source.
|
void |
setUp(Compiler compiler)
Sets up the reference.
|
String |
toString()
Returns a String representation of itself.
|
public abstract void execute(@Nonnull Task task) throws Task.ExecuteException, Stack.AccessException
task
- The task.Task.ExecuteException
- when appropriate.Stack.AccessException
- When raised by the stack.@Nonnull @CheckReturnValue public abstract Operation getOperation()
@CheckReturnValue public final int getPosition()
public final void setPosition(int position)
position
- The position.public void setUp(@Nonnull Compiler compiler) throws Compiler.CompileException
compiler
- The compiler generating the program.Compiler.CompileException
- On failure.public final String toString()
toString
in class Object
protected static void fail() throws Task.ExecuteException
Task.ExecuteException
- Always.protected static void fail(@Nonnull String message) throws Task.ExecuteException
message
- The message.Task.ExecuteException
- Always.Copyright © 2003-2019 Serge Brisson. All Rights Reserved.