mirror of
https://github.com/tiennm99/lombok.git
synced 2026-05-28 06:21:43 +00:00
a2ebb4ce36
The `test.javac6` job causes a ton of errors because many tests use java8+ features. Marking them off as java8+ targeted only.
36 lines
724 B
Java
36 lines
724 B
Java
//version 8:
|
|
//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;
|
|
} |