예제 #1
0
파일: Mixin.java 프로젝트: fengwuze/test4j
 /**
  * Helper method to create a bean mixin. For finer control over the generated instance, use a new
  * instance of <code>Mixin</code> instead of this static method. TODO
  */
 public static Mixin createBean(ClassLoader loader, Object[] beans) {
   Generator gen = new Generator();
   gen.setStyle(STYLE_BEANS);
   gen.setDelegates(beans);
   gen.setClassLoader(loader);
   return gen.create();
 }
예제 #2
0
파일: Mixin.java 프로젝트: fengwuze/test4j
 /**
  * Helper method to create an interface mixin. For finer control over the generated instance, use
  * a new instance of <code>Mixin</code> instead of this static method. TODO
  */
 public static Mixin create(Class[] interfaces, Object[] delegates) {
   Generator gen = new Generator();
   gen.setClasses(interfaces);
   gen.setDelegates(delegates);
   return gen.create();
 }
예제 #3
0
파일: Mixin.java 프로젝트: fengwuze/test4j
 /**
  * Helper method to create an interface mixin. For finer control over the generated instance, use
  * a new instance of <code>Mixin</code> instead of this static method. TODO
  */
 public static Mixin create(Object[] delegates) {
   Generator gen = new Generator();
   gen.setDelegates(delegates);
   return gen.create();
 }