mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-13 18:15:55 +00:00
41 lines
868 B
Java
41 lines
868 B
Java
import lombok.experimental.ExtensionMethod;
|
|
@ExtensionMethod(Extensions.class) class ExtensionMethodSuppress {
|
|
ExtensionMethodSuppress() {
|
|
super();
|
|
}
|
|
public void test() {
|
|
Test.staticMethod();
|
|
Test test = new Test();
|
|
Extensions.instanceMethod(test);
|
|
Extensions.staticMethod(test);
|
|
}
|
|
}
|
|
@ExtensionMethod(value = Extensions.class,suppressBaseMethods = false) class ExtensionMethodKeep {
|
|
ExtensionMethodKeep() {
|
|
super();
|
|
}
|
|
public void test() {
|
|
Test.staticMethod();
|
|
Test test = new Test();
|
|
test.instanceMethod();
|
|
test.staticMethod();
|
|
}
|
|
}
|
|
class Test {
|
|
Test() {
|
|
super();
|
|
}
|
|
public static void staticMethod() {
|
|
}
|
|
public void instanceMethod() {
|
|
}
|
|
}
|
|
class Extensions {
|
|
Extensions() {
|
|
super();
|
|
}
|
|
public static void staticMethod(Test test) {
|
|
}
|
|
public static void instanceMethod(Test test) {
|
|
}
|
|
} |