case START_ELEMENT: if (BEAN.equals(reader.getName().getLocalPart())) { if (!processBean(type, reader, context)) { return; if (!processService(type, reader, context)) { return; if (!processReference(type, reader, context)) { return; if (!processProperty(type, reader, context)) { return; if (!processProducer(type, reader, context)) { return; if (!processConsumer(type, reader, context)) { return; postProcess(type, context); return;
/** * Performs heuristic introspection and validation. * * @param type the component type * @param context the context for reporting errors */ private void postProcess(SpringComponentType type, IntrospectionContext context) { if (type.getServices().isEmpty() && type.getReferences().isEmpty() && type.getProperties().isEmpty()) { processHueristics(type, context); return; } // introspect service contracts for service elements that do not explicitly have a type element postProcessServices(type, context); }
/** * Performs heuristic introspection and validation of services. * * @param type the component type * @param context the context for reporting errors */ private void postProcessServices(SpringComponentType type, IntrospectionContext context) { for (SpringService service : type.getSpringServices().values()) { String target = service.getTarget(); BeanDefinition definition = type.getBeansById().get(target); if (definition == null) { definition = type.getBeansByName().get(target); } if (definition == null) { ServiceTargetNotFound failure = new ServiceTargetNotFound(service.getName(), target, type); context.addError(failure); continue; } if (service.getServiceContract() == null) { introspectContract(service, definition, type, context); } } }
try { ClassLoader loader = context.getClassLoader(); consumerType = cast(loader.loadClass(typeAttr)); } catch (ClassNotFoundException e) { InvalidValue failure = new InvalidValue("Consumer interface not found: " + typeAttr, startLocation);
/** * Performs heuristic introspection and validation of services. * * @param type the component type * @param context the context for reporting errors */ private void postProcessServices(SpringComponentType type, IntrospectionContext context) { for (SpringService service : type.getSpringServices().values()) { String target = service.getTarget(); BeanDefinition definition = type.getBeansById().get(target); if (definition == null) { definition = type.getBeansByName().get(target); } if (definition == null) { ServiceTargetNotFound failure = new ServiceTargetNotFound(service.getName(), target, type); context.addError(failure); continue; } if (service.getServiceContract() == null) { introspectContract(service, definition, type, context); } } }
try { ClassLoader loader = context.getClassLoader(); consumerType = cast(loader.loadClass(typeAttr)); } catch (ClassNotFoundException e) { InvalidValue failure = new InvalidValue("Consumer interface not found: " + typeAttr, startLocation);
case START_ELEMENT: if (BEAN.equals(reader.getName().getLocalPart())) { if (!processBean(type, reader, context)) { return; if (!processService(type, reader, context)) { return; if (!processReference(type, reader, context)) { return; if (!processProperty(type, reader, context)) { return; if (!processProducer(type, reader, context)) { return; if (!processConsumer(type, reader, context)) { return; postProcess(type, context); return;
/** * Performs heuristic introspection and validation. * * @param type the component type * @param context the context for reporting errors */ private void postProcess(SpringComponentType type, IntrospectionContext context) { if (type.getServices().isEmpty() && type.getReferences().isEmpty() && type.getProperties().isEmpty()) { processHueristics(type, context); return; } // introspect service contracts for service elements that do not explicitly have a type element postProcessServices(type, context); }
/** * Performs heuristic introspection and validation of services. * * @param type the component type * @param context the context for reporting errors */ private void postProcessServices(SpringComponentType type, IntrospectionContext context) { for (SpringService service : type.getSpringServices().values()) { String target = service.getTarget(); BeanDefinition definition = type.getBeansById().get(target); if (definition == null) { definition = type.getBeansByName().get(target); } if (definition == null) { ServiceTargetNotFound failure = new ServiceTargetNotFound(service.getName(), target, type); context.addError(failure); continue; } if (service.getServiceContract() == null) { introspectContract(service, definition, type, context); } } }
try { ClassLoader loader = context.getClassLoader(); consumerType = cast(loader.loadClass(typeAttr)); } catch (ClassNotFoundException e) { InvalidValue failure = new InvalidValue("Consumer interface not found: " + typeAttr, startLocation);
case START_ELEMENT: if (BEAN.equals(reader.getName().getLocalPart())) { if (!processBean(type, reader, context)) { return; if (!processService(type, reader, context)) { return; if (!processReference(type, reader, context)) { return; if (!processProperty(type, reader, context)) { return; if (!processProducer(type, reader, context)) { return; if (!processConsumer(type, reader, context)) { return; postProcess(type, context); return;
/** * Performs heuristic introspection and validation. * * @param type the component type * @param context the context for reporting errors */ private void postProcess(SpringComponentType type, IntrospectionContext context) { if (type.getServices().isEmpty() && type.getReferences().isEmpty() && type.getProperties().isEmpty()) { processHueristics(type, context); return; } // introspect service contracts for service elements that do not explicitly have a type element postProcessServices(type, context); }