Authors: russell@unturf.com · brackishbert@gmail.com · foxhop.net · TimeHexOn.com Patches, unit tests, benchmarks, whitepaper, and outreach briefs. Public domain — no copyright claimed. Use freely.
12 lines
197 B
Java
12 lines
197 B
Java
/*
|
|
* /nodynamiccopyright/
|
|
*/
|
|
|
|
import java.lang.invoke.VarHandle;
|
|
|
|
class PolymorphicMethodTest<V> {
|
|
VarHandle vh;
|
|
V method(Object obj) {
|
|
return (V)vh.getAndSet(this, obj);
|
|
}
|
|
}
|