mirror of
https://github.com/tiennm99/lombok.git
synced 2026-05-28 08:21:35 +00:00
1b534d17d3
Specifically, Rawi01's patches to make javadoc behaviour in eclipse better, which cannot be applied to ecj as you get load errors (javadoc not a thing there). As part of this commit, tests can be limited to ecj or eclipse, and I made cut-down versions of a few tests (to run on ecj, as the main one cannot be, due to javadoc issues). The tests now marked as eclipse only don't fail on ecj, but they don't generate the same result. Alternatively, we could go with a separated out after-ecj and after-eclipse dir instead, but that's perhaps going overboard.
35 lines
711 B
Java
35 lines
711 B
Java
//platform !eclipse: Requires a 'full' eclipse with intialized workspace, and we don't (yet) have that set up properly in the test run.
|
|
import lombok.Getter;
|
|
import lombok.Setter;
|
|
import lombok.experimental.Delegate;
|
|
import lombok.val;
|
|
|
|
import java.util.function.Function;
|
|
|
|
public class ValDelegateMethodReference {
|
|
|
|
public void config() {
|
|
val column = createColumn(Entity::getValue);
|
|
}
|
|
|
|
private <V> Column<Entity, V> createColumn(Function<Entity, V> func) {
|
|
return new Column<>(func);
|
|
}
|
|
|
|
}
|
|
|
|
class Column<T, V> {
|
|
public Column(Function<T, V> vp) {}
|
|
}
|
|
|
|
class Entity {
|
|
@Delegate
|
|
private MyDelegate innerDelegate;
|
|
}
|
|
|
|
@Getter
|
|
@Setter
|
|
class MyDelegate {
|
|
private String value;
|
|
private Boolean aBoolean;
|
|
} |