![JAR search and dependency download from the Maven repository](/logo.png)
org.metawidget.inspectionresultprocessor.iface.DomInspectionResultProcessor Maven / Gradle / Ivy
// Metawidget
//
// This file is dual licensed under both the LGPL
// (http://www.gnu.org/licenses/lgpl-2.1.html) and the EPL
// (http://www.eclipse.org/org/documents/epl-v10.php). As a
// recipient of Metawidget, you may choose to receive it under either
// the LGPL or the EPL.
//
// Commercial licenses are also available. See http://metawidget.org
// for details.
package org.metawidget.inspectionresultprocessor.iface;
/**
* Processes the given inspection result as a DOM Element.
*
* DomInspectionResultProcessor
is an optional interface that enables an
* optimization. Like most optimizations it unfortunately adds some complexity. The basic idea is
* that, whilst XML is a great lowest-common-denominator for the
* InspectionResultProcessor
interface (perfect for platform-neutral implementations)
* serializing to and from XML strings is expensive.
*
* Most InspectionResultProcessors maintain their inspection results internally in a DOM. This
* interface allows them to expose that DOM directly, rather than serializing it to a String,
* whereupon the Metawidget must typically deserialize it back again.
*
* @author Richard Kennard
*/
public interface DomInspectionResultProcessor
extends InspectionResultProcessor {
//
// Methods
//
/**
* Optimized verison of processInspectionResult
that avoids DOM
* serialization/deserialization.
*
* @param inspectionResult
* the inspection result to process. Never null
*/
E processInspectionResultAsDom( E inspectionResult, M metawidget, Object toInspect, String type, String... names );
}