Skip to content

Instantly share code, notes, and snippets.

@vyazelenko
Last active December 26, 2015 19:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vyazelenko/7205242 to your computer and use it in GitHub Desktop.
Save vyazelenko/7205242 to your computer and use it in GitHub Desktop.
private static MethodHandle prepareGetter(MethodHandle mh) {
return mh.asType(mh.type().changeParameterType(0, Object.class)
.changeReturnType(Object.class));
}
private static MethodHandle prepareSetter(MethodHandle mh) {
return mh.asType(mh.type().changeParameterType(0, Object.class)
.changeParameterType(1, Object.class));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment