peichhorn/lombok-pg — Issue #43: [Feature request] LazyField
Author: nicholas22
Created: 2011-11-01 11:25:51+00:00
State: open

With all this auto-construction goodness, many times you want to initialise a field that depends on a field that is not yet initialised. For example:

@RequiredArgsConstructor
public final class SimpleProperty
implements ISimpleProperty
{
private final String typeName;
private final String propertyName;

@LazyField
private String name = typeName+"."+propertyName;
}

A construct as the above would allow for this kind of post-construction processing, as at the moment this obviously is not possible. I think Getter(lazy=true) may be doing something like this on a property level...