Class EventMethodModel

java.lang.Object
org.apache.fop.events.model.EventMethodModel
All Implemented Interfaces:
Serializable, org.apache.xmlgraphics.util.XMLizable

public class EventMethodModel extends Object implements Serializable, org.apache.xmlgraphics.util.XMLizable
Represents an event method. Each method in an event producer interface will result in one instance of EventMethodModel.
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • methodName

      private String methodName
    • severity

      private EventSeverity severity
    • params

      private List params
    • exceptionClass

      private String exceptionClass
  • Constructor Details

    • EventMethodModel

      public EventMethodModel(String methodName, EventSeverity severity)
      Creates an new instance.
      Parameters:
      methodName - the event method's name
      severity - the event severity
  • Method Details

    • addParameter

      public void addParameter(EventMethodModel.Parameter param)
      Adds a method parameter.
      Parameters:
      param - the method parameter
    • addParameter

      public EventMethodModel.Parameter addParameter(Class type, String name)
      Adds a method parameter.
      Parameters:
      type - the type of the parameter
      name - the name of the parameter
      Returns:
      the resulting Parameter instance
    • setMethodName

      public void setMethodName(String name)
      Sets the event method name.
      Parameters:
      name - the event name
    • getMethodName

      public String getMethodName()
      Returns the event method name
      Returns:
      the event name
    • setSeverity

      public void setSeverity(EventSeverity severity)
      Sets the event's severity level.
      Parameters:
      severity - the severity
    • getSeverity

      public EventSeverity getSeverity()
      Returns the event's severity level.
      Returns:
      the severity
    • getParameters

      public List getParameters()
      Returns an unmodifiable list of parameters for this event method.
      Returns:
      the list of parameters
    • setExceptionClass

      public void setExceptionClass(String exceptionClass)
      Sets the primary exception class for this event method. Note: Not all event methods throw exceptions!
      Parameters:
      exceptionClass - the exception class
    • getExceptionClass

      public String getExceptionClass()
      Returns the primary exception class for this event method. This method returns null if the event is only informational or just a warning.
      Returns:
      the primary exception class or null
    • toSAX

      public void toSAX(ContentHandler handler) throws SAXException
      Specified by:
      toSAX in interface org.apache.xmlgraphics.util.XMLizable
      Throws:
      SAXException