private void addReference(InjectingComponentType componentType, TypeMapping typeMapping, String name, Type parameterType, InjectionSite site, IntrospectionContext context) { Class<?> type = helper.getBaseType(parameterType, typeMapping); ServiceContract contract = contractProcessor.introspect(type, context, componentType); Reference<ComponentType> reference = new Reference<>(name, contract); helper.processMultiplicity(reference, false, parameterType, typeMapping); componentType.add(reference, site); } }
private Reference<ComponentType> createDefinition(String name, boolean required, Type type, Class<?> implClass, InjectingComponentType componentType, IntrospectionContext context) { TypeMapping typeMapping = context.getTypeMapping(implClass); Class<?> baseType = helper.getBaseType(type, typeMapping); ServiceContract contract = contractProcessor.introspect(baseType, implClass, context, componentType); Reference<ComponentType> definition = new Reference<>(name, contract); helper.processMultiplicity(definition, required, type, typeMapping); return definition; }
@SuppressWarnings({"unchecked"}) private void addReference(InjectingComponentType componentType, String name, Class<?> parameterType, Class<?> declaringClass, InjectionSite site, IntrospectionContext context) { TypeMapping typeMapping = context.getTypeMapping(declaringClass); ServiceContract contract = contractProcessor.introspect(parameterType, context, componentType); Reference reference = new Reference(name, contract); helper.processMultiplicity(reference, false, parameterType, typeMapping); componentType.add(reference, site); } }
@SuppressWarnings({"unchecked"}) private ReferenceDefinition createDefinition(String name, boolean required, Type type, Class<?> implClass, Annotation[] annotations, InjectingComponentType componentType, IntrospectionContext context) { TypeMapping typeMapping = context.getTypeMapping(implClass); Class<?> baseType = helper.getBaseType(type, typeMapping); ServiceContract contract = contractProcessor.introspect(baseType, implClass, context, componentType); ReferenceDefinition definition = new ReferenceDefinition(name, contract); helper.processMultiplicity(definition, required, type, typeMapping); if (policyProcessor != null) { for (Annotation annotation : annotations) { policyProcessor.process(annotation, definition, context); } } return definition; }
private void addReference(InjectingComponentType componentType, TypeMapping typeMapping, String name, Type parameterType, InjectionSite site, Annotation[] annotations, IntrospectionContext context) { Class<?> type = helper.getBaseType(parameterType, typeMapping); ServiceContract contract = contractProcessor.introspect(type, context, componentType); ReferenceDefinition reference = new ReferenceDefinition(name, contract); helper.processMultiplicity(reference, false, parameterType, typeMapping); if (policyProcessor != null) { for (Annotation annotation : annotations) { policyProcessor.process(annotation, reference, context); } } componentType.add(reference, site); } }