All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.metawidget.inspector.iface.DomInspector Maven / Gradle / Ivy

The newest version!
// 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.inspector.iface;

/**
 * Inspects the given Object and type and returns the result as a DOM Element.
 * 

* DomInspector 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 Inspector interface (perfect for passing * between disparate technologies and tiers in order to allow maximum flexibility in what can be * inspected) serializing to and from XML strings is expensive. *

* Most Inspectors 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 either the * Metawidget or a CompositeInspector must typically deserialize it back again. *

* If your Inspector extends BaseObjectInspector or * BaseXmlInspector, this optimization is implemented for you. * * @author Richard Kennard */ public interface DomInspector extends Inspector { // // Methods // /** * Optimized verison of inspect that avoids DOM serialization/deserialization. */ E inspectAsDom( Object toInspect, String type, String... names ); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy