private Constructor constructor(Class target) { Constructor[] ca = target.getDeclaredConstructors(); for (Constructor c : ca) { if (subjectToInject(c)) { c.setAccessible(true); return c; } } return null; }
private Constructor constructor(Class target) { Constructor[] ca = target.getDeclaredConstructors(); for (Constructor c : ca) { if (subjectToInject(c)) { c.setAccessible(true); return c; } } return null; }
private List<FieldInjector> fieldInjectors(BeanSpec target, Set<BeanSpec> chain) { List<FieldInjector> fieldInjectors = C.newList(); for (BeanSpec fieldSpec : target.nonStaticFields()) { if (subjectToInject(fieldSpec)) { fieldSpec.makeFieldAccessible(); fieldInjectors.add(fieldInjector(fieldSpec, chain)); } } return fieldInjectors; }
private List<FieldInjector> fieldInjectors(BeanSpec target, Set<BeanSpec> chain) { List<FieldInjector> fieldInjectors = C.newList(); for (BeanSpec fieldSpec : target.nonStaticFields()) { if (subjectToInject(fieldSpec)) { fieldSpec.makeFieldAccessible(); fieldInjectors.add(fieldInjector(fieldSpec, chain)); } } return fieldInjectors; }
private List<MethodInjector> methodInjectors(BeanSpec target, Set<BeanSpec> chain) { BeanSpec current = target; List<MethodInjector> methodInjectors = C.newList(); while (null != current && !current.isObject()) { for (Method method : current.getDeclaredMethods()) { if (subjectToInject(method)) { method.setAccessible(true); methodInjectors.add(methodInjector(method, chain)); } } current = current.parent(); } return methodInjectors; }
private List<MethodInjector> methodInjectors(BeanSpec target, Set<BeanSpec> chain) { BeanSpec current = target; List<MethodInjector> methodInjectors = C.newList(); while (null != current && !current.isObject()) { for (Method method : current.getDeclaredMethods()) { if (subjectToInject(method)) { method.setAccessible(true); methodInjectors.add(methodInjector(method, chain)); } } current = current.parent(); } return methodInjectors; }
public boolean subjectToInject(BeanSpec spec) { return app().isSingleton(spec.rawType()) || genie().subjectToInject(spec); }
public boolean subjectToInject(BeanSpec spec) { return app().isSingleton(spec.rawType()) || genie().subjectToInject(spec); }