} else { if ( desc.getDescription(PropertyDescription.class) != null || desc.getDescription(ReferenceDescription.class) != null || desc.getDescription(ServiceDescription.class) != null ) { iLog.addWarning("Class '" + src.getClassName() + "' contains SCR annotations, but not a " + "@Component (or equivalent) annotation. Therefore no component descriptor is created for this " +
/** * Parses the descriptors read from the given input stream. This method may * be called by the {@link #getComponentDescriptors()} method to parse the * descriptors gathered in an implementation dependent way. * * @throws SCRDescriptorException If an error occurs reading the * descriptors from the stream. */ private void readServiceComponentDescriptor( final InputStream file, final String location ) throws SCRDescriptorException { final List<ClassDescription> list = ComponentDescriptorIO.read( file, this.project.getClassLoader(), iLog, location ); if ( list != null ) { for(final ClassDescription cd : list) { final String name; if ( cd.getDescribedClass() == null ) { name = cd.getDescription(ComponentDescription.class).getName(); } else { name = cd.getDescribedClass().getName(); } loadedDependencies.put(name, cd); } } }
/** * Process service directives */ private void processServices(final ClassDescription current, final ComponentContainer component) { final ServiceDescription serviceDesc = current.getDescription(ServiceDescription.class); if ( serviceDesc != null ) { ServiceDescription service = component.getServiceDescription(); if ( service == null ) { service = new ServiceDescription(serviceDesc.getAnnotation()); service.setServiceFactory(false); component.setServiceDescription(service); } if ( serviceDesc.isServiceFactory() ) { service.setServiceFactory(true); } for(final String className : serviceDesc.getInterfaces()) { service.addInterface(className); } } }
final IssueLog iLog) throws SCRDescriptorException { final ComponentDescription componentDesc = desc.getDescription(ComponentDescription.class); boolean inherit; do { final ComponentDescription cd = current.getDescription(ComponentDescription.class); inherit = (cd == null ? true : cd.isInherit());