if (options.contains(Discover.all) && !clazz.is(QUERY.CONCRETE, null, analyzer)) { return null; if (clazz.is(QUERY.ANNOTATED, VETOED_INSTR, analyzer) || (!clazz.is(QUERY.INDIRECTLY_ANNOTATED, COMPONENTSCOPED_INSTR, analyzer) && !clazz.is(QUERY.INDIRECTLY_ANNOTATED, NORMALSCOPE_INSTR, analyzer) && !clazz.is(QUERY.INDIRECTLY_ANNOTATED, STEREOTYPE_INSTR, analyzer) && !clazz.is(QUERY.ANNOTATED, DEPENDENT_INSTR, analyzer) && !clazz.is(QUERY.ANNOTATED, INTERCEPTOR_INSTR, analyzer)) || clazz.is(QUERY.IMPLEMENTS, EXTENSION_INSTR, analyzer)) { if (packageClazz != null && packageClazz.is(QUERY.ANNOTATED, VETOED_INSTR, analyzer)) { return null;
if (!clazz.is(type, instr, this)) { c.remove();
if (!activatorClazz.is(QUERY.IMPLEMENTS, new Instruction("org.osgi.framework.BundleActivator"), analyzer)) { registerActivatorErrorLocation(error("The Bundle Activator " + bactivator +
if (options.contains(Discover.all) && !clazz.is(QUERY.CONCRETE, null, analyzer)) { return null; if (clazz.is(QUERY.ANNOTATED, VETOED_INSTR, analyzer) || (!clazz.is(QUERY.INDIRECTLY_ANNOTATED, COMPONENTSCOPED_INSTR, analyzer) && !clazz.is(QUERY.INDIRECTLY_ANNOTATED, NORMALSCOPE_INSTR, analyzer) && !clazz.is(QUERY.INDIRECTLY_ANNOTATED, STEREOTYPE_INSTR, analyzer) && !clazz.is(QUERY.ANNOTATED, DEPENDENT_INSTR, analyzer) && !clazz.is(QUERY.ANNOTATED, INTERCEPTOR_INSTR, analyzer)) || clazz.is(QUERY.IMPLEMENTS, EXTENSION_INSTR, analyzer)) { if (packageClazz != null && packageClazz.is(QUERY.ANNOTATED, VETOED_INSTR, analyzer)) { return null;
if (!activatorClazz.is(QUERY.IMPLEMENTS, new Instruction("org.osgi.framework.BundleActivator"), analyzer)) { registerActivatorErrorLocation(error("The Bundle Activator " + bactivator +
if (!clazz.is(type, instr, this)) { c.remove();
if (!clazz.is(type, instr, this)) { c.remove();
if (!clazz.is(type, instr, this)) { c.remove();
if (!clazz.is(type, instr, this)) { c.remove();
if (instr == null) throw new IllegalArgumentException("Not enough arguments in ${packages} macro"); accept = pkgInfo != null && pkgInfo.is(Clazz.QUERY.ANNOTATED, instr, this); break; case VERSIONED :
if (instr == null) throw new IllegalArgumentException("Not enough arguments in ${packages} macro"); accept = pkgInfo != null && pkgInfo.is(Clazz.QUERY.ANNOTATED, instr, this); break; case VERSIONED :
/** * Check if an annotation applied on the component class is a component property type. * (the following is adapted from the original bnd DS AnnotationReader class) */ private void handlePossibleComponentPropertyAnnotation(Annotation annotation) { m_logger.debug("Checking possible component property annotations %s", annotation); try { Clazz clazz = m_analyzer.findClass(annotation.getName()); if (clazz == null) { m_logger.debug( "Unable to find the annotation %s applied to type %s from project build path (ignoring it).", annotation.getName().getFQN(), m_currentClassName); return; } if (clazz.is(ANNOTATED, DS_PROPERTY_TYPE, m_analyzer) || clazz.is(ANNOTATED, DM_PROPERTY_TYPE, m_analyzer)) { m_logger.debug("Found component property type %s", annotation); m_componentPropertyTypes.add(annotation); } else { m_logger.debug("The annotation %s on component type %s will not be used for properties as the annotation is not annotated with @ComponentPropertyType", clazz.getFQN(), m_currentClassName); return; } } catch (Exception e) { m_logger.error("An error occurred when attempting to process annotation %s, applied to component %s", e, annotation.getName().getFQN(), m_currentClassName); } }
if (clazz.is(ANNOTATED, COMPONENT_PROPERTY_INSTR, analyzer)) { String propertyDefKey = String.format(ComponentDef.PROPERTYDEF_ANNOTATIONFORMAT, ++componentPropertyTypeCount);
return false; return clazz.is(query, instr, analyzer);
if (clazz.is(ANNOTATED, COMPONENT_PROPERTY_INSTR, analyzer)) { String propertyDefKey = String.format(ComponentDef.PROPERTYDEF_ANNOTATIONFORMAT, ++componentPropertyTypeCount);
return false; return clazz.is(query, instr, analyzer);
return false; return clazz.is(query, instr, analyzer);