M
- Metawidget that supports this InspectionResultProcessorpublic interface InspectionResultProcessor<M> extends Immutable
InspectionResultProcessors 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). If they need to store state, they should use the Metawidget passed to each method.
Processing an inspection result can be useful in a variety of cases. For example, you can sort domain object properties based on a defined ordering, or choose only certain properties based on the UI screen being displayed. In more advanced cases, you could 'unpack' an inspection result that contained nested entities so that you could, say, iterate over a Collection.
Note: InspectionResultProcessors are an example of the Strategy design pattern.
String processInspectionResult(String inspectionResult, M metawidget, Object toInspect, String type, String... names)
inspectionResult
- the inspection result to process, as XML conforming to inspection-result-1.0.xsd.
Never nullmetawidget
- the parent Metawidget. Never null. May be useful to help processingtoInspect
- the Object being inspected. May be useful to help processingtype
- the type being inspected. May be useful to help processingnames
- the names being inspected. May be useful to help processingCopyright © 2015. All Rights Reserved.