Class MarkupInspector<E extends MarkupException>

  • All Implemented Interfaces:
    Visitor
    Direct Known Subclasses:
    InvalidMarkupInspector, MissingMarkupInspector

    public abstract class MarkupInspector<E extends MarkupException>
    extends AbstractVisitor

    This class provides a skeletal implementation of class model inspectors.

    Unlike evaluation, which takes place in "dynamic mode", the inspection takes place in "static mode". The inspector performs the full traversal of the specified class model object. Every problematic PMML element or attribute is reported in the form of an appropriate MarkupException instance. The class model object can be considered safe and sound if the list of exceptions stays empty.

    Typical usage:
     static
     public <E extends MarkupException> void inspect(MarkupInspector<E> inspector){
       Visitable visitable = ...;
    
       try {
         inspector.applyTo(visitable);
       } catch(MarkupException me){
         List<E> exceptions = inspector.getException();
       }
     }