added example code for bytebuddy

This commit is contained in:
Seun Matt
2017-07-16 01:13:09 +01:00
parent 54a5079a35
commit 23959fc2c2
4 changed files with 123 additions and 0 deletions
@@ -0,0 +1,16 @@
package com.baeldung.bytebuddy;
import net.bytebuddy.implementation.bind.annotation.BindingPriority;
public class Bar {
@BindingPriority(3)
public static String sayHelloBar() { return "Holla in Bar!"; }
@BindingPriority(2)
public static String sayBar() { return "bar"; }
public String bar() { return Bar.class.getSimpleName() + " - Bar"; }
}
@@ -0,0 +1,7 @@
package com.baeldung.bytebuddy;
public class Foo {
public String sayHelloFoo() { return "Hello in Foo!"; }
}