public String toString() { return getFQN(); }
public String toString() { return getFQN(); }
public void implementsInterfaces(String names[]) { MethodDef def = new MethodDef(0, clazz.getFQN(), "<implements>", "()V"); for (String interfaceName : names) { interfaceName = Clazz.internalToFqn(interfaceName); for (Map.Entry<MethodDef, List<MethodDef>> entry : catalog .entrySet()) { String catalogClass = entry.getKey().clazz; List<MethodDef> references = entry.getValue(); if (catalogClass.equals(interfaceName)) { references.add(def); } } } }
void annotated(Map<String, Map<String, String>> components, Clazz c, Map<String, String> info) throws Exception { // Get the component definition // from the annotations Map<String, String> map = ComponentAnnotationReader.getDefinition(c, this); // Pick the name, the annotation can override // the name. String localname = map.get(COMPONENT_NAME); if (localname == null) localname = c.getFQN(); // Override the component info without manifest // entries. We merge the properties though. String merged = Processor.merge(info.remove(COMPONENT_PROPERTIES), map.remove(COMPONENT_PROPERTIES)); if (merged != null && merged.length() > 0) map.put(COMPONENT_PROPERTIES, merged); map.putAll(info); createComponentResource(components, localname, map); }
public boolean analyzeJar(Analyzer analyzer) throws Exception { Map<String, Map<String, String>> map = analyzer.parseHeader(analyzer .getProperty(Constants.METATYPE)); Jar jar = analyzer.getJar(); for (String name : map.keySet()) { Collection<Clazz> metatypes = analyzer.getClasses("", QUERY.ANNOTATION.toString(), Meta.OCD.class.getName(), // QUERY.NAMED.toString(), name // ); for (Clazz c : metatypes) { jar.putResource("OSGI-INF/metatype/" + c.getFQN() + ".xml", new MetaTypeReader(c, analyzer)); } } return false; } }
if (ec == null) { analyzer.error("Missing super class for DS annotations: " + Clazz.pathToFqn(extendsClass) + " from " + c.getFQN()); } else { c.parseClassFileWithCollector(this);
public void finish() { set(COMPONENT_MULTIPLE, multiple); set(COMPONENT_DYNAMIC, dynamic); set(COMPONENT_OPTIONAL, optional); set(COMPONENT_IMPLEMENTATION, clazz.getFQN(), "<>"); set(COMPONENT_PROPERTIES, properties); if (version != null) { set(COMPONENT_VERSION, version, "<>"); reporter.trace("Component %s is v1.1", map); } set(COMPONENT_DESCRIPTORS, descriptors); }
component.implementation = clazz.getFQN(); component.name = comp.name(); component.factory = comp.factory();
reporter.error( "AD for %s.%s uses an array of collections in return type (%s), Metatype allows either Vector or array", clazz.getFQN(), method.name, method.getReturnType()); Matcher m = COLLECTION.matcher(rtype); if (m.matches()) {