Files
lombok/usage_examples/onXExample_pre.jpage
T
grootjans e0cfacd3b3 Issue 192: Add documentation for onMethod=, onParam, onConstructor
still have to make a minor edit in the pre/post files
2011-02-28 16:44:06 +01:00

23 lines
730 B
Plaintext

import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.Setter;
public class OnMethodOnParamExample {
@Getter(onMethod=@Deprecated) private int fires = 200;
@Setter(onMethod=@Deprecated) private int firemen = 20;
@Setter(onParam=@SuppressWarnings("all")) private String fireStationName = "base";
@Override public String toString() {
return String.format("firestation:%s, %d firemen are fighting %d fires", fireStationName, firemen, fires);
}
}
@RequiredArgsConstructor(onConstructor=@Deprecated)
class OnConstructorExample {
private final int radishes;
private int bananas;
@Override public String toString() {
return String.format("I have %d bananas and %d radishes", bananas, radishes);
}
}