private void processSite(InjectingComponentType componentType, String name, Member member, Class<?> parameterType, Class<?> declaringClass, InjectionSite site, IntrospectionContext context) { TypeMapping typeMapping = context.getTypeMapping(declaringClass); InjectableType type = helper.inferType(parameterType, typeMapping); switch (type) { case PROPERTY: addProperty(componentType, name, parameterType, declaringClass, site, context); break; case REFERENCE: addReference(componentType, name, parameterType, declaringClass, site, context); break; case CALLBACK: context.addError(new UnknownInjectionType(site, type, componentType.getImplClass().getName(), member, componentType)); break; default: context.addError(new UnknownInjectionType(site, type, componentType.getImplClass().getName(), member, componentType)); } }
private void processSite(InjectingComponentType componentType, TypeMapping typeMapping, String name, Member member, Type parameterType, InjectionSite site, IntrospectionContext context) { InjectableType type = helper.inferType(parameterType, typeMapping); switch (type) { case PROPERTY: addProperty(componentType, typeMapping, name, parameterType, site); break; case REFERENCE: addReference(componentType, typeMapping, name, parameterType, site, context); break; default: String clazz = componentType.getImplClass().getName(); UnknownInjectionType error = new UnknownInjectionType(site, type, clazz, member, componentType); context.addError(error); } }
private void processSite(InjectingComponentType componentType, TypeMapping typeMapping, String name, Member member, Type parameterType, InjectionSite site, Annotation[] annotations, IntrospectionContext context) { InjectableType type = helper.inferType(parameterType, typeMapping); switch (type) { case PROPERTY: addProperty(componentType, typeMapping, name, parameterType, site); break; case REFERENCE: addReference(componentType, typeMapping, name, parameterType, site, annotations, context); break; case CALLBACK: // ignore break; default: context.addError(new UnknownInjectionType(site, type, componentType.getImplClass(), member, componentType)); break; } }