* @param metadata list of metadata to be filled
*/
private void computeAnnotations(String name, byte[] bytecode, List<Element> metadata) {
ClassReader cr = new ClassReader(bytecode);
ClassMetadataCollector collector = new ClassMetadataCollector(m_registry, m_reporter);
cr.accept(collector, 0);
if (collector.getComponentMetadata() != null) {
metadata.add(collector.getComponentMetadata());
// Instantiate ?
Element instance = collector.getInstanceMetadata();
if (instance != null) {
m_reporter.trace("Declaring an instance of %s", instance.getAttribute("component"));
metadata.add(instance);
}
}