Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.grogra.rgg
Class ObjectSynth<T,V>

    java.lang.Object
      de.grogra.rgg.ObjectSynth<T,V>

Type Parameters:
  `T` - the type of objects for which synthesized attributes are computed
  `V` - the type of the synthesized attribute

All Implemented Interfaces:
  VoidToObjectGenerator<V>

    public final class ObjectSynth<T,V>

extends java.lang.Object
implements 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
`T` | `object` The current object.

Constructor Summary
`ObjectSynth()`

Method Summary
`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)`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### object

    public T object

  The current object.

Constructor Detail

### ObjectSynth

    public ObjectSynth()

Method Detail

### evaluateObject

    public void evaluateObject(ObjectConsumer<? super V> cons)

  This generator method yields the values of the synthesized attribute for every descendant of `object`. These values have been computed previously.

  Specified by:
    `evaluateObject` in interface `VoidToObjectGenerator<V>`
  Parameters:
    `cons` - the consumer which receives the values of synthesized attribute of descendants

### get

    public V get(int index)

### size

    public int size()

### values

    public void values(ObjectConsumer<? super V> cons)

  This method is an alias for `evaluateObject(de.grogra.xl.lang.ObjectConsumer)`.

Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD