/** * Make a JDOM <layer> {@link Element} serialising the given * {@link DispatchLayer}. * * @param layer * layer to serialise * @return <:layer>: {@link Element} describing the * {@link DispatchLayer} */ public static Element dispatchLayerAsXML(DispatchLayer<?> layer) throws JDOMException, IOException { Element layerElem = new Element(LAYER); ClassLoader cl = layer.getClass().getClassLoader(); if (cl instanceof LocalArtifactClassLoader) { layerElem.addContent(ravenElement((LocalArtifactClassLoader) cl)); } Element classNameElement = new Element(CLASS); classNameElement.setText(layer.getClass().getName()); layerElem.addContent(classNameElement); // Get element for configuration Object o = layer.getConfiguration(); Element configElement = beanAsElement(o); layerElem.addContent(configElement); return layerElem; }
/** * Make a JDOM <layer> {@link Element} serialising the given * {@link DispatchLayer}. * * @param layer * layer to serialise * @return <:layer>: {@link Element} describing the * {@link DispatchLayer} */ @Deprecated public static Element dispatchLayerAsXML(DispatchLayer<?> layer) throws JDOMException, IOException { Element layerElem = new Element(LAYER); ClassLoader cl = layer.getClass().getClassLoader(); if (cl instanceof LocalArtifactClassLoader) { layerElem.addContent(ravenElement((LocalArtifactClassLoader) cl)); } Element classNameElement = new Element(CLASS); classNameElement.setText(layer.getClass().getName()); layerElem.addContent(classNameElement); // Get element for configuration Object o = layer.getConfiguration(); Element configElement = beanAsElement(o); layerElem.addContent(configElement); return layerElem; }
if (cl instanceof LocalArtifactClassLoader) { activityElem .addContent(ravenElement((LocalArtifactClassLoader) cl));
if (cl instanceof LocalArtifactClassLoader) { activityElem .addContent(ravenElement((LocalArtifactClassLoader) cl));