1 package samples;
2 import net.sf.cglib.core.KeyFactory;
3 public class KeySample {
4 private interface MyFactory {
5 public Object newInstance(int a, char[] b, String d);
6 }
7 public static void main(String[] args) {
8 MyFactory f = (MyFactory)KeyFactory.create(MyFactory.class);
9 Object key1 = f.newInstance(20, new char[]{ 'a', 'b' }, "hello");
10 Object key2 = f.newInstance(20, new char[]{ 'a', 'b' }, "hello");
11 Object key3 = f.newInstance(20, new char[]{ 'a', '_' }, "hello");
12 System.out.println(key1.equals(key2));
13 System.out.println(key2.equals(key3));
14 }
15 }
This page was automatically generated by Maven