public interface Inspector extends Immutable
Inspectors must be immutable (or, at least, appear that way to clients. They can have caches or configuration settings internally, as long as they are threadsafe).
This interface does not pass an M metawidget
or any other kind of 'helper context'
as the other interfaces do. This is because Inspectors need to exist independent of any
particular UI framework. Indeed, they can exist on back-end tiers where no UI framework is
available at all. If you find yourself needing access to a context, consider using an
InspectionResultProcessor
.
String inspect(Object toInspect, String type, String... names)
Note: the method returns a String, rather than a DOM, to support the use of hetergenous technologies between the Inspectors and the Metawidgets. For example, GwtMetawidget is written in JavaScript but its Inspectors are written in Java.
toInspect
- runtime object to inspect. May be nulltype
- match type attribute in inspection-result.xmlnames
- match name attributes under typeCopyright © 2015. All Rights Reserved.