{
throw new JRException("Object of type " + top.getClass().getName() + " is not a "
+ Component.class.getName() + " instance");
}
Component component = (Component) top;
JRDesignComponentElement componentElement = (JRDesignComponentElement) getDigester().peek(1);
String namespacePrefix = ((JRXmlDigester) getDigester()).getLastNamespacePrefix();
ComponentKey componentKey = new ComponentKey(namespace, namespacePrefix, name);
componentElement.setComponentKey(componentKey);
componentElement.setComponent(component);