java.lang.Object
de.grogra.rgg.ObjectSynth<T,V>
- Type Parameters:
T
- the type of objects for which synthesized attributes are computedV
- the type of the synthesized attribute
- All Implemented Interfaces:
VoidToObjectGenerator<V>
Instances of
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.- Author:
- Ole Kniemeyer
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
evaluateObject
(ObjectConsumer<? super V> cons) This generator method yields the values of the synthesized attribute for every descendant ofobject
.get
(int index) int
size()
void
values
(ObjectConsumer<? super V> cons) This method is an alias forevaluateObject(de.grogra.xl.lang.ObjectConsumer<? super V>)
.
-
Field Details
-
object
The current object.
-
-
Constructor Details
-
ObjectSynth
public ObjectSynth()
-
-
Method Details
-
evaluateObject
This generator method yields the values of the synthesized attribute for every descendant ofobject
. These values have been computed previously.- Specified by:
evaluateObject
in interfaceVoidToObjectGenerator<T>
- Parameters:
cons
- the consumer which receives the values of synthesized attribute of descendants
-
values
This method is an alias forevaluateObject(de.grogra.xl.lang.ObjectConsumer<? super V>)
. -
size
public int size() -
get
-