membersInjector.getInjectionPoints(), factory.create(), constructorParameterInjectors,
membersInjector.getInjectionPoints(), factory.create(), constructorParameterInjectors,
membersInjector.getInjectionPoints(), factory.create(), constructorParameterInjectors,
private <T> ConstructorInjector<T> createConstructor(InjectionPoint injectionPoint, Errors errors) throws ErrorsException { int numErrorsBefore = errors.size(); SingleParameterInjector<?>[] constructorParameterInjectors = injector.getParametersInjectors(injectionPoint.getDependencies(), errors); @SuppressWarnings("unchecked") // the injector type agrees with the injection point type MembersInjectorImpl<T> membersInjector = (MembersInjectorImpl<T>) injector.membersInjectorStore .get(injectionPoint.getDeclaringType(), errors); ConstructionProxyFactory<T> factory = new DefaultConstructionProxyFactory<T>(injectionPoint); errors.throwIfNewErrors(numErrorsBefore); return new ConstructorInjector<T>(membersInjector.getInjectionPoints(), factory.create(), constructorParameterInjectors, membersInjector); } }
private <T> ConstructorInjector<T> createConstructor(InjectionPoint injectionPoint, Errors errors) throws ErrorsException { int numErrorsBefore = errors.size(); SingleParameterInjector<?>[] constructorParameterInjectors = injector.getParametersInjectors(injectionPoint.getDependencies(), errors); @SuppressWarnings("unchecked") // the injector type agrees with the injection point type MembersInjectorImpl<T> membersInjector = (MembersInjectorImpl<T>) injector.membersInjectorStore .get(injectionPoint.getDeclaringType(), errors); /*if[AOP]*/ ImmutableList<MethodAspect> injectorAspects = injector.state.getMethodAspects(); ImmutableList<MethodAspect> methodAspects = membersInjector.getAddedAspects().isEmpty() ? injectorAspects : ImmutableList.copyOf(concat(injectorAspects, membersInjector.getAddedAspects())); ConstructionProxyFactory<T> factory = new ProxyFactory<T>(injectionPoint, methodAspects); /*end[AOP]*/ /*if[NO_AOP] ConstructionProxyFactory<T> factory = new DefaultConstructionProxyFactory<T>(injectionPoint); end[NO_AOP]*/ errors.throwIfNewErrors(numErrorsBefore); return new ConstructorInjector<T>(membersInjector.getInjectionPoints(), factory.create(), constructorParameterInjectors, membersInjector); } }
private <T> ConstructorInjector<T> createConstructor(InjectionPoint injectionPoint, Errors errors) throws ErrorsException { int numErrorsBefore = errors.size(); SingleParameterInjector<?>[] constructorParameterInjectors = injector.getParametersInjectors(injectionPoint.getDependencies(), errors); @SuppressWarnings("unchecked") // the injector type agrees with the injection point type MembersInjectorImpl<T> membersInjector = (MembersInjectorImpl<T>) injector.membersInjectorStore .get(injectionPoint.getDeclaringType(), errors); /*if[AOP]*/ ImmutableList<MethodAspect> injectorAspects = injector.state.getMethodAspects(); ImmutableList<MethodAspect> methodAspects = membersInjector.getAddedAspects().isEmpty() ? injectorAspects : ImmutableList.copyOf(concat(injectorAspects, membersInjector.getAddedAspects())); ConstructionProxyFactory<T> factory = new ProxyFactory<T>(injectionPoint, methodAspects); /*end[AOP]*/ /*if[NO_AOP] ConstructionProxyFactory<T> factory = new DefaultConstructionProxyFactory<T>(injectionPoint); end[NO_AOP]*/ errors.throwIfNewErrors(numErrorsBefore); return new ConstructorInjector<T>(membersInjector.getInjectionPoints(), factory.create(), constructorParameterInjectors, membersInjector); } }
private <T> ConstructorInjector<T> createConstructor(InjectionPoint injectionPoint, Errors errors) throws ErrorsException { int numErrorsBefore = errors.size(); SingleParameterInjector<?>[] constructorParameterInjectors = injector.getParametersInjectors(injectionPoint.getDependencies(), errors); @SuppressWarnings("unchecked") // the injector type agrees with the injection point type MembersInjectorImpl<T> membersInjector = (MembersInjectorImpl<T>) injector.membersInjectorStore .get(injectionPoint.getDeclaringType(), errors); /*if[AOP]*/ ImmutableList<MethodAspect> injectorAspects = injector.state.getMethodAspects(); ImmutableList<MethodAspect> methodAspects = membersInjector.getAddedAspects().isEmpty() ? injectorAspects : ImmutableList.copyOf(concat(injectorAspects, membersInjector.getAddedAspects())); ConstructionProxyFactory<T> factory = new ProxyFactory<T>(injectionPoint, methodAspects); /*end[AOP]*/ /*if[NO_AOP] ConstructionProxyFactory<T> factory = new DefaultConstructionProxyFactory<T>(injectionPoint); end[NO_AOP]*/ errors.throwIfNewErrors(numErrorsBefore); return new ConstructorInjector<T>(membersInjector.getInjectionPoints(), factory.create(), constructorParameterInjectors, membersInjector); } }