public static class Reducer.Context<D> extends Object implements MessageReceiver<SimpleMessage<D>>, Environment
Modifier and Type | Method and Description |
---|---|
<X> X |
abort()
Aborts the current creation of an AST node.
|
<K,V> V |
compute(Object varKey,
K mapKey,
BiFunction<? super K,? super V,? extends V> remappingFunction) |
<K,V> V |
computeIfAbsent(Object varKey,
K mapKey,
Function<? super K,? extends V> fun) |
void |
error(Location<D> location,
String message,
Object... args) |
void |
error(String message,
Object... args) |
<R> Action<State,SimpleMessage<D>,State> |
eval(eu.bandm.tools.ramus.runtime2.Reducer.BoundConstructor<D,R> cons,
Success<?,SimpleMessage<D>,State> recyclable) |
Data |
get(Object key) |
Location<D> |
getLocation() |
MessageReceiver<SimpleMessage<D>> |
getMessages() |
Data |
getValue() |
void |
hint(Location<D> location,
String message,
Object... args) |
void |
hint(String message,
Object... args) |
void |
pop() |
void |
push() |
void |
put(Object key,
Data value) |
void |
receive(SimpleMessage<D> message) |
void |
setValue(Data value) |
void |
warning(Location<D> location,
String message,
Object... args) |
void |
warning(String message,
Object... args) |
public MessageReceiver<SimpleMessage<D>> getMessages()
public <R> Action<State,SimpleMessage<D>,State> eval(eu.bandm.tools.ramus.runtime2.Reducer.BoundConstructor<D,R> cons, Success<?,SimpleMessage<D>,State> recyclable)
public void receive(SimpleMessage<D> message)
receive
in interface MessageReceiver<SimpleMessage<D>>
public Data getValue()
getValue
in interface Environment
public Data get(Object key)
get
in interface Environment
public void setValue(Data value)
public void push()
public void pop()
public <K,V> V compute(Object varKey, K mapKey, BiFunction<? super K,? super V,? extends V> remappingFunction)
public <K,V> V computeIfAbsent(Object varKey, K mapKey, Function<? super K,? extends V> fun)
public <X> X abort() throws Reducer.Abort
This method never returns. It is suitable to use as the
argument of a return
instruction.
Reducer.Abort
- alwayssee also the complete user documentation .