Skip to content

Instantly share code, notes, and snippets.

@tylertreat
Created December 31, 2014 21:29
Show Gist options
  • Select an option

  • Save tylertreat/9e748545586fb3eabfb7 to your computer and use it in GitHub Desktop.

Select an option

Save tylertreat/9e748545586fb3eabfb7 to your computer and use it in GitHub Desktop.
MyClass myClass = new MyClass();
MyClass proxy = (MyClass) Enhancer.create(
MyClass.class,
new HelloWorldInvocationHandler(myClass));
proxy.foo(42); // "Hello World" is printed and then 42 is passed to foo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment