@Test public void testInjectConstruct() throws Exception { ClassFile targetClass = new ClassFile(); targetClass.setName("test"); ClassFile vanillaClass = new ClassFile(); vanillaClass.setName("ab"); Method constructor = new Method(vanillaClass, "<init>", new Signature("()V")); vanillaClass.addMethod(constructor); Inject inject = mock(Inject.class); when(inject.findVanillaForInterface(Matchers.any(Class.class))) .thenReturn(vanillaClass); InjectConstruct injectConstruct = new InjectConstruct(inject); injectConstruct.injectConstruct(targetClass, APIClass.class.getDeclaredMethod("create")); assertNotNull(targetClass.findMethod("create")); }
public InjectConstruct(Inject inject) { this.inject = inject; }
InjectConstruct { public InjectConstruct(Inject inject) { this.inject = inject; } }
InjectConstruct { public InjectConstruct(Inject inject) { this.inject = inject; } InjectConstruct(Inject inject); }
InjectConstruct { public InjectConstruct(Inject inject) { this.inject = inject; } InjectConstruct(Inject inject); void inject(Map<ClassFile, java.lang.Class> implemented); void injectConstruct(ClassFile targetClass, java.lang.reflect.Method apiMethod); }
InjectConstruct { public InjectConstruct(Inject inject) { this.inject = inject; } InjectConstruct(Inject inject); void inject(Map<ClassFile, java.lang.Class> implemented); void injectConstruct(ClassFile targetClass, java.lang.reflect.Method apiMethod);  }