Class StaxXMLReporterWrapper

  • All Implemented Interfaces:
    XMLReporter

    public class StaxXMLReporterWrapper
    extends java.lang.Object
    implements XMLReporter
    Wraps a javax.xml.stream.XMLReporter Object to provide the jadex.xml.stax.XMLReporter API.
    • Constructor Summary

      Constructors 
      Constructor Description
      StaxXMLReporterWrapper​(javax.xml.stream.XMLReporter reporter)
      Constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static XMLReporter fromXMLReporter​(javax.xml.stream.XMLReporter reporter)
      Static method to wrap an XMLReporter
      void report​(java.lang.String message, java.lang.String errorType, java.lang.Object relatedInformation, ILocation location)
      Report the desired message in an application specific format.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StaxXMLReporterWrapper

        public StaxXMLReporterWrapper​(javax.xml.stream.XMLReporter reporter)
        Constructor.
        Parameters:
        reporter - The Reporter object to be wrapped.
    • Method Detail

      • report

        public void report​(java.lang.String message,
                           java.lang.String errorType,
                           java.lang.Object relatedInformation,
                           ILocation location)
                    throws java.lang.Exception
        Report the desired message in an application specific format. Only warnings and non-fatal errors should be reported through this interface. Fatal errors should be thrown as XMLStreamException.
        Specified by:
        report in interface XMLReporter
        Parameters:
        message - the error message
        errorType - an implementation defined error type
        relatedInformation - information related to the error, if available
        location - the location of the error, if available
        Throws:
        javax.xml.stream.XMLStreamException
        XMLStreamException
        java.lang.Exception
      • fromXMLReporter

        public static XMLReporter fromXMLReporter​(javax.xml.stream.XMLReporter reporter)
        Static method to wrap an XMLReporter
        Parameters:
        reporter -
        Returns:
        the wrapped XMLReporter