de.grogra.rgg
T - the type of objects for which synthesized attributes are computedV - the type of the synthesized attributepublic final class ObjectSynth<T,V> extends java.lang.Object implements VoidToObjectGenerator<V>
ObjectSynth are used in the context of the method
Library.synthesize(Object, ObjectToObjectGenerator, ObjectToObject).
and represent the information needed for the computation of a synthesized
attribute: object is the current object for which the
synthesized attribute has to be computed, the generator method
evaluateObject yields the values of the synthesized attributes of
object's descendants.| Constructor and Description |
|---|
ObjectSynth() |
| Modifier and Type | Method and Description |
|---|---|
void |
evaluateObject(ObjectConsumer<? super V> cons)
This generator method yields the values of the synthesized attribute
for every descendant of
object. |
V |
get(int index) |
int |
size() |
void |
values(ObjectConsumer<? super V> cons)
This method is an alias for
evaluateObject(de.grogra.xl.lang.ObjectConsumer super V>). |
public T object
public void evaluateObject(ObjectConsumer<? super V> cons)
object. These values have been
computed previously.evaluateObject in interface VoidToObjectGenerator<V>cons - the consumer which receives the values of synthesized
attribute of descendantspublic V get(int index)
public int size()
public void values(ObjectConsumer<? super V> cons)
evaluateObject(de.grogra.xl.lang.ObjectConsumer super V>).