public abstract static class Operation.Abstract extends Object implements Operation
Operation.Abstract, Operation.OverloadException
Modifier | Constructor and Description |
---|---|
protected |
Abstract(String name)
Creates an instance.
|
protected |
Abstract(String name,
Optional<Filter> filter)
Creates an instance.
|
Modifier and Type | Method and Description |
---|---|
void |
execute(Task task)
Executes this for the specified Task.
|
Operation |
filter(Task task,
OperationReference reference)
Apply the overloading filters to locate the appropriate operation.
|
String |
getName()
Gets the name of this operation.
|
OperationReference |
newReference(Compiler compiler)
Returns a new reference to this operation.
|
void |
register(Map<String,Operation> registrations)
Registers itself on a registrations map.
|
String |
toString()
Returns a String representation of itself.
|
protected Abstract(@Nonnull String name)
name
- The name of this operation.protected Abstract(@Nonnull String name, @Nonnull Optional<Filter> filter)
name
- The name of this operation.filter
- Optional filter to apply for overload resolution.public void execute(Task task) throws Task.ExecuteException
public final Operation filter(Task task, OperationReference reference) throws Task.ExecuteException
public final String getName()
public OperationReference newReference(Compiler compiler)
newReference
in interface Operation
compiler
- The compiler generating the program.public final void register(Map<String,Operation> registrations) throws Operation.OverloadException
register
in interface Operation
registrations
- The registrations map.Operation.OverloadException
- When not a subclass of the overloaded.public final String toString()
toString
in class Object
Copyright © 2003-2019 Serge Brisson. All Rights Reserved.