public static Map<String,String> getDefinition(Clazz c, Reporter reporter) throws Exception { ComponentAnnotationReader r = new ComponentAnnotationReader(c); r.setReporter(reporter); c.parseClassFileWithCollector(r); r.finish(); return r.map; }
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); }
set(COMPONENT_NAME, annotation.get(Component.NAME), "<>"); set(COMPONENT_FACTORY, annotation.get(Component.FACTORY), false); setBoolean(COMPONENT_ENABLED, annotation.get(Component.ENABLED), true); setBoolean(COMPONENT_IMMEDIATE, annotation.get(Component.IMMEDIATE), false); setBoolean(COMPONENT_SERVICEFACTORY, annotation.get(Component.SERVICEFACTORY), false); set(COMPONENT_DESIGNATE, Clazz.objectDescriptorToFQN(configs), ""); String configs = annotation.get(Component.DESIGNATE_FACTORY); if (configs != null) { set(COMPONENT_DESIGNATEFACTORY, Clazz.objectDescriptorToFQN(configs), ""); setVersion((String) annotation.get(Component.VERSION)); set(COMPONENT_CONFIGURATION_POLICY, configurationPolicy.toLowerCase(), ""); doProperties(annotation); p[i] = descriptorToFQN(provides[i].toString()); set(COMPONENT_PROVIDE, Processor.join(Arrays.asList(p)), "<>"); if (!checkMethod()) setVersion(V1_1); setVersion(V1_1); set(COMPONENT_ACTIVATE, method, "<>"); if (!checkMethod())
public static Map<String,String> getDefinition(Clazz c) throws Exception { return getDefinition(c, new Processor()); }
set(COMPONENT_NAME, annotation.get(Component.NAME), "<>"); set(COMPONENT_FACTORY, annotation.get(Component.FACTORY), false); setBoolean(COMPONENT_ENABLED, annotation.get(Component.ENABLED), true); setBoolean(COMPONENT_IMMEDIATE, annotation.get(Component.IMMEDIATE), false); setBoolean(COMPONENT_SERVICEFACTORY, annotation.get(Component.SERVICEFACTORY), false); set(COMPONENT_DESIGNATE, Clazz.objectDescriptorToFQN(configs), ""); String configs = annotation.get(Component.DESIGNATE_FACTORY); if (configs != null) { set(COMPONENT_DESIGNATEFACTORY, Clazz.objectDescriptorToFQN(configs), ""); setVersion((String) annotation.get(Component.VERSION)); set(COMPONENT_CONFIGURATION_POLICY, configurationPolicy.toLowerCase(), ""); doProperties(annotation); p[i] = descriptorToFQN(provides[i].toString()); set(COMPONENT_PROVIDE, Processor.join(Arrays.asList(p)), "<>"); if (!checkMethod()) setVersion(V1_1); setVersion(V1_1); set(COMPONENT_ACTIVATE, method, "<>"); if (!checkMethod())
public static Map<String, String> getDefinition(Clazz c) throws Exception { return getDefinition(c, new Processor()); }
set(COMPONENT_NAME, annotation.get(Component.NAME), "<>"); set(COMPONENT_FACTORY, annotation.get(Component.FACTORY), false); setBoolean(COMPONENT_ENABLED, annotation.get(Component.ENABLED), true); setBoolean(COMPONENT_IMMEDIATE, annotation.get(Component.IMMEDIATE), false); setBoolean(COMPONENT_SERVICEFACTORY, annotation.get(Component.SERVICEFACTORY), false); set(COMPONENT_DESIGNATE, Clazz.objectDescriptorToFQN(configs), ""); String configs = annotation.get(Component.DESIGNATE_FACTORY); if (configs != null) { set(COMPONENT_DESIGNATEFACTORY, Clazz.objectDescriptorToFQN(configs), ""); setVersion((String) annotation.get(Component.VERSION)); set(COMPONENT_CONFIGURATION_POLICY, configurationPolicy.toLowerCase(), ""); doProperties(annotation); p[i] = descriptorToFQN(provides[i].toString()); set(COMPONENT_PROVIDE, Processor.join(Arrays.asList(p)), "<>"); if (!checkMethod()) setVersion(V1_1); setVersion(V1_1); set(COMPONENT_ACTIVATE, method, "<>"); if (!checkMethod())
public static Map<String,String> getDefinition(Clazz c, Reporter reporter) throws Exception { ComponentAnnotationReader r = new ComponentAnnotationReader(c); r.setReporter(reporter); c.parseClassFileWithCollector(r); r.finish(); return r.map; }
public static Map<String,String> getDefinition(Clazz c) throws Exception { return getDefinition(c, new Processor()); }
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); }
set(COMPONENT_NAME, annotation.get(Component.NAME), "<>"); set(COMPONENT_FACTORY, annotation.get(Component.FACTORY), false); setBoolean(COMPONENT_ENABLED, annotation.get(Component.ENABLED), true); setBoolean(COMPONENT_IMMEDIATE, annotation.get(Component.IMMEDIATE), false); setBoolean(COMPONENT_SERVICEFACTORY, annotation.get(Component.SERVICEFACTORY), false); set(COMPONENT_DESIGNATE, Clazz.objectDescriptorToFQN(configs), ""); String configs = annotation.get(Component.DESIGNATE_FACTORY); if (configs != null) { set(COMPONENT_DESIGNATEFACTORY, Clazz.objectDescriptorToFQN(configs), ""); setVersion((String) annotation.get(Component.VERSION)); set(COMPONENT_CONFIGURATION_POLICY, configurationPolicy.toLowerCase(), ""); doProperties(annotation); p[i] = descriptorToFQN(provides[i].toString()); set(COMPONENT_PROVIDE, Processor.join(Arrays.asList(p)), "<>"); if (!checkMethod()) setVersion(V1_1); setVersion(V1_1); set(COMPONENT_ACTIVATE, method, "<>"); if (!checkMethod())
public static Map<String,String> getDefinition(Clazz c, Reporter reporter) throws Exception { ComponentAnnotationReader r = new ComponentAnnotationReader(c); r.setReporter(reporter); c.parseClassFileWithCollector(r); r.finish(); return r.map; }
public static Map<String,String> getDefinition(Clazz c) throws Exception { return getDefinition(c, new Processor()); }
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); }
public static Map<String, String> getDefinition(Clazz c, Reporter reporter) throws Exception { ComponentAnnotationReader r = new ComponentAnnotationReader(c); r.setReporter(reporter); c.parseClassFileWithCollector(r); r.finish(); return r.map; }
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 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); }
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); }
void set(String name, Collection<String> l) { if (l.size() == 0) return; set(name, Processor.join(l), "<>"); }
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); }